HasVariable

From the Fallout3 GECK Wiki
Revision as of 19:19, 30 August 2014 by imported>Odessa (+see also)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
< [[::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

[help]
(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