1. Find your way through the deepest dungeon in the 18th Mini Mapping Contest Poll.
    Dismiss Notice
  2. A brave new world lies beyond the seven seas. Join the 34th Modeling Contest today!
    Dismiss Notice
  3. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
Hive 3 Remoosed BETA - NOW LIVE. Go check it out at BETA Hive Workshop! Post your feedback in this new forum BETA Feedback.
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

[Solved] How to handle globals without overwriting?

Discussion in 'World Editor Help Zone' started by [db]east, Sep 9, 2020.

  1. [db]east

    [db]east

    Joined:
    Feb 27, 2019
    Messages:
    144
    Resources:
    0
    Resources:
    0
    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: Sep 9, 2020
  2. DoomBlade

    DoomBlade

    Joined:
    Feb 5, 2018
    Messages:
    378
    Resources:
    0
    Resources:
    0
    -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.
     
  3. [db]east

    [db]east

    Joined:
    Feb 27, 2019
    Messages:
    144
    Resources:
    0
    Resources:
    0