Difference between revisions of "HasVariable"
Jump to navigation
Jump to search
imported>Odessa m (category + see also) |
imported>Odessa m (+see also) |
||
Line 33: | Line 33: | ||
*[[SetVariable]] (Added by NVSE 4.5.6) | *[[SetVariable]] (Added by NVSE 4.5.6) | ||
*[[SetRefVariable]] (Aded by NVSE 4.5.6) | *[[SetRefVariable]] (Aded by NVSE 4.5.6) | ||
*[[Associating data with a reference]] | |||
[[Category:Functions_(NVSE)]] | [[Category:Functions_(NVSE)]] | ||
[[Category:Script Functions]] | [[Category:Script Functions]] |
Latest revision as of 19:19, 30 August 2014
< [[::Category:Functions|Category:Functions]]
A function added by the New Vegas Script Extender.
Description
Returns true (1) if the specified object's script has a variable of the specified name. Works for any scriptable object for all variable types. Added by NVSE V4.1.
Syntax
(bool) ref.HasVariable VarName:string Parent:Object
Example
ref rActor if rActor.HasVariable "Waiting" ; Set or get it, etc endif ; Alternatively, (or required if rActor holds a base form): if HasVariable "Waiting", rActor
See Also
- ShowVars / Con_ShowVars to print all variables and values to the console
- GetVariable (to retrieve the actual value of a numeric variable)
- GetRefVariable (as above for ref variables)
- GetArrayVariable (and for arrays)
- SetVariable (Added by NVSE 4.5.6)
- SetRefVariable (Aded by NVSE 4.5.6)
- Associating data with a reference