1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. The Lich King demands your service! We've reached the 19th edition of the Icon Contest. Come along and make some chilling servants for the one true king.
    Dismiss Notice
  4. The 4th SFX Contest has started. Be sure to participate and have a fun factor in it.
    Dismiss Notice
  5. The poll for the 21st Terraining Contest is LIVE. Be sure to check out the entries and vote for one.
    Dismiss Notice
  6. The results are out! Check them out.
    Dismiss Notice
  7. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  8. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  9. Check out the Staff job openings thread.
    Dismiss Notice
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,530
    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,307
    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