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.

Dealing with waits

Discussion in 'World Editor Help Zone' started by Banti, Sep 6, 2014.

  1. Banti

    Banti

    Joined:
    Dec 21, 2012
    Messages:
    120
    Resources:
    1
    Maps:
    1
    Resources:
    1
    I am using Waits for spawning for many triggers like this one and I think is making resynchronize in all triggers. Can I change this trigger for better or is better to use jass spawning system?

    • Wait 7000.00 seconds
    • Set Temp_Region = bandit respawn <gen>
    • Set Temp_Point = (Center of bandit respawn <gen>)
    • Set Temp_Point2 = (Center of bandit respawn <gen>)
    • Unit - Create 5 Bandit for Neutral Hostile at Temp_Point facing Temp_Point2
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Custom script: call RemoveLocation (udg_Temp_Point2)
    • Custom script: call RemoveRect(udg_Temp_Region)
    • Custom script: set udg_Temp_Region = null
    • Trigger - Turn off (This trigger)
    • Custom script: call DestroyTrigger(GetTriggeringTrigger())
     
  2. deathismyfriend

    deathismyfriend

    Joined:
    Oct 24, 2012
    Messages:
    6,526
    Resources:
    14
    Spells:
    12
    Tutorials:
    2
    Resources:
    14
    Use timed triggers or countdown timers for your spawning. Waits are very bad to use for several reasons. You can see why they are bad in my tutorial Things you should know when using triggers / gui.
     
  3. Banti

    Banti

    Joined:
    Dec 21, 2012
    Messages:
    120
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Yes I was checking it before. It help me a lot with memory leaks. Can you give me example how to use timed triggers and countdown timers for my spawning in demo map. I can make countdown timer but I don't know how to replace waits.
     
  4. LordDz

    LordDz

    Joined:
    May 11, 2007
    Messages:
    4,303
    Resources:
    0
    Resources:
    0
    7000 / 60 = 116 minutes? You should design your scenario better as you don't know exactly where the players will be after 116 minutes, use a "unit enters region" or similiar instead, or players who stand and wait at a certain point will be punished.
     
  5. Licheus

    Licheus

    Joined:
    Apr 18, 2009
    Messages:
    562
    Resources:
    0
    Resources:
    0
    Here's an example of a very basic creep spawning system. Every time all creeps die or the game begins, a 5 seconds timer is started. When the timer reaces 0, a wave of creeps is spawned. It might not be exactly what youre after, but if you study the triggers (ask questions if needed) you might get how timers can be used.
     

    Attached Files:

  6. Banti

    Banti

    Joined:
    Dec 21, 2012
    Messages:
    120
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Thanks for your help Licheus. I get it now. Entering region is not so bad idea