Difference between revisions of "Mod - GlobalVariable"
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>Thingy Person (→Syntax) |
||
(One intermediate revision by one other user not shown) | |||
Line 8: | Line 8: | ||
<source lang="papyrus"> | <source lang="papyrus"> | ||
float Function Mod(float afHowMuch) | float Function Mod(float afHowMuch) | ||
Value += afHowMuch | |||
Return Value | |||
EndFunction | |||
</source> | </source> | ||
Line 19: | Line 22: | ||
<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 fNewValue = TimeOfDayGlobal.Mod(1.0) | |||
</source> | </source> | ||
Latest revision as of 18:46, 29 June 2013
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[edit | edit source]
float Function Mod(float afHowMuch)
Value += afHowMuch
Return Value
EndFunction
Parameters[edit | edit source]
- afHowMuch: How much to adjust the global by
Return Value[edit | edit source]
None.
Examples[edit | edit source]
; Add one to the time of day global and get the new value
Float fNewValue = TimeOfDayGlobal.Mod(1.0)