Difference between revisions of "IsEnabled - ObjectReference"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>JustinOther
m (Noted as convenience function. '!IsDisabled()' is slightly faster/Linked IsDisabled)
imported>Thingy Person
 
Line 8: Line 8:
<source lang="papyrus">
<source lang="papyrus">
bool Function IsEnabled()
bool Function IsEnabled()
return !IsDisabled()
EndFunction
</source>
</source>



Latest revision as of 17:05, 29 June 2013

Member of: ObjectReference Script

Checks to see if this object is currently enabled. (The opposite of IsDisabled)

Syntax[edit | edit source]

bool Function IsEnabled()
	return !IsDisabled()
EndFunction

Parameters[edit | edit source]

None.

Return Value[edit | edit source]

If this object is currently enabled.

Examples[edit | edit source]

; Is the shield enabled?
if (ShieldProperty.IsEnabled())
  Debug.Trace("The shield is up!")
endIf

Notes[edit | edit source]

  • This is a convenience function that inverts IsDisabled, thus '!IsDisabled()' is slightly faster.

See Also[edit | edit source]