Difference between revisions of "Mod - GlobalVariable"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>Jlundin
(Created page with 'Category:Scripting Category:Papyrus '''Member of:''' GlobalVariable Script Modifies the value of the global variable in a thread-safe way (value can't change between…')
 
imported>JustinOther
m (→‎Examples: Floatified afHowMuch)
Line 19: Line 19:
<source lang="papyrus">
<source lang="papyrus">
; Add one to the time of day global and get the new value
; Add one to the time of day global and get the new value
float newValue = TimeOfDayGlobal.Mod(1)
Float fNewValue = TimeOfDayGlobal.Mod(1.0)
</source>
</source>



Revision as of 12:39, 8 October 2012

Member of: GlobalVariable Script

Modifies the value of the global variable in a thread-safe way (value can't change between read and write of the global), and returns the new value.

Syntax

float Function Mod(float afHowMuch)

Parameters

  • afHowMuch: How much to adjust the global by

Return Value

None.

Examples

; Add one to the time of day global and get the new value
Float fNewValue = TimeOfDayGlobal.Mod(1.0)

See Also