AddScriptVariable
Revision as of 23:40, 27 March 2015 by imported>Jazzisparis (Created page with "{{Function |origin = JIP |summary = Adds a new variable to either an object script (when called by an object reference), or a quest script (when called on a quest). |name =...")
< [[::Category:Functions|Category:Functions]]
A function added by the JIP NVSE Plugin.
Description
Adds a new variable to either an object script (when called by an object reference), or a quest script (when called on a quest).
Syntax
reference.AddScriptVariable varName:string quest:ref
Example
RaulRef.AddScriptVariable "NewVar"
AddScriptVariable "NewVar" VERNovac01
Notes
- The new variable has no explicit type, and can store either a numeric (float) value, or a reference.
- To retrieve/set the value of the new variable, use any of GetVariable/GetRefVariable/SetVariable/SetRefVariable.
- The new variable remains valid only for the duration of the current game-session, and is lost when the game is restarted.