Difference between revisions of "HasVariable"

Jump to navigation Jump to search
127 bytes added ,  06:47, 5 August 2014
can also be called on ref
imported>Odessa
(Created (source, whatsnew, obsedocs + personal usage))
 
imported>Odessa
(can also be called on ref)
Line 1: Line 1:
{{Function
{{Function
  |origin = NVSE
  |origin = NVSE
  |summary = Returns true if the specified object's script has a variable of the specified name. Works on both quests and actors for all variable types. Added by NVSE V4.1.
  |summary = Returns true 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.
  |name = HasVariable
  |name = HasVariable
  |returnType = bool
  |returnType = bool
Line 10: Line 10:
   |Name = Parent
   |Name = Parent
   |Type = Object
   |Type = Object
  |Optional = y
   }}
   }}
  |referenceType =  
  |referenceType = ref
|example = ref rActor
}}
if HasVariable "Waiting", rActor
==Example==
<pre>
ref rActor
 
if rActor.HasVariable "Waiting"
     ; Set or get it, etc
     ; Set or get it, etc
endif
endif
}}
 
; Alternatively, (or required if rActor holds a base form):
 
if HasVariable "Waiting", rActor
</pre>
==See Also==
==See Also==
*[[GetVariable]] (to retrieve the actual value of a numeric variable)
*[[GetVariable]] (to retrieve the actual value of a numeric variable)
Anonymous user

Navigation menu