StoreCampaignObject(string, string, object, object)
Stores an item or creature in the campaign database.
int StoreCampaignObject( string sCampaignName, string sVarName, object oObject, object oPlayer = OBJECT_INVALID );
Parameters
sCampaignName
Campaign name (case-sensitive)
sVarName
Unique variable name.
oObject
Object value to store
oPlayer
Player to associate this object value with. (Default: OBJECT_INVALID)
Description
Stores an item or creature in the campaign database. Campaign names are case-sensitive. Returns 1 if successful, 0 if the function fails. Only items or creatures can be stored using this function.
If it is a creature, all inventory items and local variables are also stored (and are retrieved when recalled) and so this function can be very CPU intensive if used often.
Remarks
It is unknown that if by specifying oPlayer that the sVarName must still be unique.
As of HotU/1.62, local variables are stored in the database - including any on items possessed if the object stored is a creature.
Version
1.62
See Also
functions: | RetrieveCampaignObject |
categories: | Database Functions |
author: Charles Feduke, editor: Jasperre, additional contributor(s): Lilac Soul, Blackstring