• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Solved] How to handle globals without overwriting?

Status
Not open for further replies.
Level 19
Joined
Feb 27, 2019
Messages
580
I have used TempPoint, TempGroup then went over to Loc[] and Group[] and even started using locals when possible but these different points and groups are set probably at some cases over 100 times per second.

Can a global variable be overwritten if there is no Wait used between usage and removal and the Events do not fire at the exact same time?

Does two triggers that run every 0.02 seconds trigger at the exact same time?

I often also use an Integer to set the correct index number because I dont know how else to do so exept using for example (Player Number of (Owner of unit (Picked unit)))

Would anyone recommend using that way to get the index or setting a variable to the index or some other technique?
 
Last edited:
Level 12
Joined
Feb 5, 2018
Messages
521
-Only use MUI for loop instances and triggers that have waits
-No trigger can ever run at the exact same time
-You only need one or two TEMP variables as they are removed instantly
for triggers that don't run loops or waits.
 
Status
Not open for further replies.
Top