Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Need help with timing of spawns.
Need help with timing of spawns.
Sep 23 2007, 4:00 am
By: OfficerTJHooker  

Sep 23 2007, 4:00 am OfficerTJHooker Post #1



Alright. I tried my luck at making madness maps. Since there was some issues with balance between different tiers of characters, I decided to put a spawn rate timer on the units. (eg, 1 sec per unit for a tier 1 unit, 2 sec per unit for a tier 2 unit etc.)

Then, I made the trigger for a Tier 1 unit like this:

Trigger
Players

  • 1
  • Conditions

  • Player 1 kills at most 249
  • Actions

  • Create Tier 1 Unit at P1 Spawn for Player 1
  • Preserve Trigger

  • it would continually spawn level 1 units at a decent rate (about 1 per second, yes?) So technically, if I added a wait trigger to about the lines of 1000 milliseconds, which is 1 second, it should spawn a level 2 unit every 2 seconds. Except this wasn't the case.
    Trigger
    Players

  • Player 1
  • Conditions

  • Player 1 kills at least 250 units
  • Player 1 kills at most 599 units
  • Actions

  • Create Tier 2 unit at P1 Spawn for Player 1
  • Wait 1000 milliseconds
  • Preserve Trigger

  • I ended up getting a huge gap of time between the spawn times of a tier 1 unit and a tier 2 unit, even though I only put in a 1000 millisecond wait time. Can anyone explain what is up with this? I even tried moving the 'wait 1000 milliseconds' trigger AFTER the Preserve trigger, and still got the same result.

    Any clarification or suggestions would be helpful, thanks!



    None.

    Sep 23 2007, 4:04 am Ultraviolet Post #2



    Well, I'm not really sure because I haven't done a whole lot of work with non-hypered triggers, but if you made hyper triggers* you could make the first one wait 1000 ms and the second one wait 2000 ms and I believe it would fix your problem.

    *Just create some triggers for a player that are along the lines of conditions: Always, Actions: Wait '0' milliseconds (repeat 62 times) and throw in a preserve trigger and a comment to make it clean.


    Post has been edited 2 time(s), last time on Apr 20 2008, 10:44 pm by NerdyTerdy.




    Sep 23 2007, 4:30 am Falkoner Post #3



    You are experiencing wait blocks, just move your hyper triggers to another player that doesn't have waits and that should fix the problem.



    None.

    Sep 23 2007, 4:47 am Esponeo Post #4



    1) Are you using Hyper Triggers? If so you are experiencing wait blocks. If you use Hyper triggers you cannot use waits anywhere else in your map without running into problems. The only viable solution is to use death counter timers, which requires a bit more explanation...

    2) Preserve Trigger means the trigger will be executed again, but only after it is finished. So it really doesn't matter where you place it inside the trigger.



    None.

    Sep 23 2007, 6:37 am DT_Battlekruser Post #5



    He is clearly not using hypertriggers, or the first trigger would not create units in the way he describes.

    Starcraft by default checks the triggers, executing those true, every 2000 milliseconds (game time). Also, any time a wait executes, the triggers are checked.

    In an ideal world, your second trigger would make the second-tier units spawn every 3000 milliseconds (game time), but it won't, because when two trigger actions execute simultaneously for the same player, and both contain waits, the triggers stack multiplicatively, resulting in "wait blocks" where the real delay until the completion of a wait is vastly increased.

    Make sure only one of those spawn triggers is executing at any given time per player, and that no other triggers with waits are running for the same player. Check through your triggers to avoid these 'wait blocks'.




    None.

    Sep 23 2007, 4:30 pm Esponeo Post #6



    Quote
    He is clearly not using hypertriggers, or the first trigger would not create units in the way he describes.
    Heh, correct. I knew there was some way I should have known that but I could not put my figure on it. Perhaps I should not offer map making advice while inebriated.



    None.

    Sep 23 2007, 4:37 pm Falkoner Post #7



    Do you have any other waits running for that player at the same time as the spawning wait runs?



    None.

    Sep 23 2007, 8:59 pm OfficerTJHooker Post #8



    Thanks guys for your help and explanations.

    From what I'm interpreting, I'm supposed to only have 1 wait trigger running at a time for a player, or else I get these so called 'wait blocks'?

    I just deleted a trigger that effected all the players and had a wait action. I'm going to go test it and see if the problem persists.



    None.

    Sep 23 2007, 9:07 pm Akar Post #9



    Yes, a blocking action (as Blizzard calls them), prevents other blocking actions from running until that blocking action is complete. In order to use wait times efficiently you'll have to make sure that there are no other running for that player at one time. Generally, you want to make wait times player specific so they are contained in a smaller area to watch out for, thus making your job a hell of a lot easier.



    None.

    Sep 24 2007, 4:21 am DT_Battlekruser Post #10



    Quote
    I just deleted a trigger that effected all the players and had a wait action.

    In general, it's bad form to structure your triggers like that. Hopefully removing the waits will fix the map; it certainly will help.



    None.

    Sep 24 2007, 12:19 pm Falkoner Post #11



    At least never put a wait into a force, or for All players, since that's just asking for wait blocks.



    None.

    Sep 28 2007, 8:55 pm Mabrutha Post #12



    I don't know why your way doesn't work. it should.



    None.

    Sep 28 2007, 9:59 pm M s4 Post #13



    Use death counters



    None.

    Options
      Back to forum
    Please log in to reply to this topic or to report it.
    Members in this topic: None.
    [07:46 am]
    RIVE -- :wob:
    [2024-4-22. : 6:48 pm]
    Ultraviolet -- :wob:
    [2024-4-21. : 1:32 pm]
    Oh_Man -- I will
    [2024-4-20. : 11:29 pm]
    Zoan -- Oh_Man
    Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
    You should do my Delirus map too; it's a little cocky to say but I still think it's actually just a good game lol
    [2024-4-20. : 8:20 pm]
    Ultraviolet -- Goons were functioning like stalkers, I think a valk was made into a banshee, all sorts of cool shit
    [2024-4-20. : 8:20 pm]
    Ultraviolet -- Oh wait, no I saw something else. It was more melee style, and guys were doing warpgate shit and morphing lings into banelings (Infested terran graphics)
    [2024-4-20. : 8:18 pm]
    Ultraviolet -- Oh_Man
    Oh_Man shouted: lol SC2 in SC1: https://youtu.be/pChWu_eRQZI
    oh ya I saw that when Armo posted it on Discord, pretty crazy
    [2024-4-20. : 8:09 pm]
    Vrael -- thats less than half of what I thought I'd need, better figure out how to open SCMDraft on windows 11
    [2024-4-20. : 8:09 pm]
    Vrael -- woo baby talk about a time crunch
    [2024-4-20. : 8:08 pm]
    Vrael -- Oh_Man
    Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
    so that gives me approximately 27 more years to finish tenebrous before you get to it?
    Please log in to shout.


    Members Online: zzt, jjf28, T-warp