jim555511 Posted December 2, 2017 Share Posted December 2, 2017 So i've been working with global variables a lot recently and i've been wondering which is better to use if you need the global variable to increase and to be able to use that new value in another script. I was also wondering if someone could explain the difference to me between .setvalue and .mod Link to comment Share on other sites More sharing options...
JonathanOstrus Posted December 2, 2017 Share Posted December 2, 2017 In simple terms: SetValue is explicit and ignores whatever the current value is. Mod does what it sounds like, modifies either + or - to the current value by some amount. I believe the Mod function is also designed thread safe where the SetValue and GetValue could have race conditions and is not necessarily thread safe. Link to comment Share on other sites More sharing options...
Recommended Posts