StoreCampaignObject

From NWN Lexicon



Contents

[edit] 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
);

[edit] 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)


[edit] 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.



[edit] 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.


[edit] Version

1.62

[edit] See Also

functions: 

RetrieveCampaignObject



 author: Charles Feduke, editor: Jasperre, additional contributor(s): Lilac Soul, Blackstring
 

Personal tools
Categories