Difference between revisions of "GetValueInt - GlobalVariable"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>JustinOther
m (Added note about expense of this vs. 'GetValue() As Int')
imported>Thingy Person
 
Line 8: Line 8:
<source lang="papyrus">
<source lang="papyrus">
int Function GetValueInt()
int Function GetValueInt()
return GetValue() as int
endFunction
</source>
</source>



Latest revision as of 18:47, 29 June 2013

Member of: GlobalVariable Script

Gets the current value of this global object, cast as an int for convenience.

Syntax[edit | edit source]

int Function GetValueInt()
	return GetValue() as int
endFunction

Parameters[edit | edit source]

None.

Return Value[edit | edit source]

The current value the global holds, cast as an int.

Examples[edit | edit source]

; Obtain the current time of day
int timeOfDay = TimeOfDayGlobalProperty.GetValueInt()

Notes[edit | edit source]

  • Under the hood, this is 'GetValue() As Int' which is measurably faster.

See Also[edit | edit source]