Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: [SOLVED] Hyper Trigger Wait Blocks
[SOLVED] Hyper Trigger Wait Blocks
This topic is locked. You can no longer write replies here.
Mar 18 2012, 9:12 am
By: DrZygote214  

Mar 18 2012, 9:12 am DrZygote214 Post #1



Okay, I have 4 players (on 2 teams), P1 to P4. What is the best method to make hyper triggers? I want to avoid 'wait blocks', but I'm not sure what those are from reading this: http://www.staredit.net/starcraft/Hyper_triggers

I'd like to make the map solid. That is, if any player leaves, it won't screw the hyper triggers. Should I put 4 standard hyper triggers in a computer player like P5, or should i do complex hyper triggers, possible between 2 comp players?

Also if someone could explain 'wait blocks', I'd be grateful. Is it the same thing as the Next Ending Occurrence?



None.

Mar 18 2012, 9:55 am Azrael Post #2



A wait block is something that happens when you use waits for their intended use, while also running hyper triggers. I believe that setting the hyper triggers to Player 8 and moving them to the bottom of the trigger list stops wait blocks from occurring.

However, I would recommend simply not using waits, as they are far less functional and versatile than death count timers.

Information on death count timers can be found here.

As for your question, you could just make Player 8 a computer player (make sure they have a start location, or the triggers won't run). Give them 4 triggers, running "Always", each trigger consisting of 63 "Wait 0 milliseconds" actions and 1 "Preserve trigger" action. Alternatively, you could leave out the computer and just do it for "All Players".

If you need more information than that, or would like help specifically implementing this into your map, you can reply with the map attached and a description of what exactly you're having trouble with. Alternatively, you can PM me the map if you don't want to post it publicly.

Edit: You could also use complex hyper triggers, using Force 1 for the first trigger and Force 2 for the second trigger (where I assume the two teams are split into forces, and that there must always be at least one person on each team). Wait blocks shouldn't really be your concern with this, but it would let you avoid adding a computer player, which will change the way the lobby looks. It'd be mostly an aesthetic decision.

Post has been edited 2 time(s), last time on Mar 18 2012, 10:58 am by Azrael.




Mar 18 2012, 10:15 am DrZygote214 Post #3



Okay ill try it with comp P8 with 4 hyper triggers.

So you're saying that wait blocks only happen if you have a regular trigger that has a wait action of at least 1 ms? How bad can the delay be?

edit: yea ill proly use death counters instead of waits. i just wanna know what im dealing with.

Quick follow up: how do you get Comsat stations to work without being attached to a CC?



None.

Mar 18 2012, 10:51 am Azrael Post #4



Quote from DrZygote214
Okay ill try it with comp P8 with 4 hyper triggers.

Yeah, that'll definitely work without any problems.

If you implement it in future maps and want to ensure there are no wait blocks, and Player 8 already has triggers being used, then you can just move them to the bottom of the trigger list (of course, this is if Player 8 is a computer in the future map :P).

Honestly, when I have no computer players, I just do the 4 standard hyper triggers and set them to run for "All Players". I've never had any issues with it.

Quote from DrZygote214
So you're saying that wait blocks only happen if you have a regular trigger that has a wait action of at least 1 ms?

It's when you're using waits outside of the hyper triggers. It has to do with the fact that when StarCraft hits a wait, it goes through all the triggers again, and can accumulate wait durations. The end result is that you can potentially cause infinitely long waits in which your triggers stop working.

This outcome is avoidable if you know how to setup hyper triggers alongside waits correctly (and from what I remember, as mentioned, simply putting them at the end of the last player's triggers stops it from causing problems). However, there's no reason to use waits, death counts are always better in every circumstance. I don't even consider waits when doing timers anymore, I just think of them as "that thing that is used for hyper triggers".

Quote from DrZygote214
How bad can the delay be?

Forever and ever.

Quote from DrZygote214
edit: yea ill proly use death counters instead of waits.

Shouldn't even be a question :P It's not just being reliable that makes death counts better. They're also far more versatile. If all your timers are DCs, you can easily set up triggers to pause, extend, reduce, and reset them. You can also make additional timers and DCs which change based on those DC timers reaching certain points (rather than just when they hit 0). It's also incredibly easy to design it to be cyclical, and to be turned on and off. There's just a ton of added functionality by using DC timers.

Quote from DrZygote214
Quick follow up: how do you get Comsat stations to work without being attached to a CC?

You have to preplace them in the map editor.




Mar 18 2012, 12:08 pm DrZygote214 Post #5



Ok quick question that just came up. How do I get it to copy preplaced units to a location?

My map has a lot of combos of units and instead of hardcoding them to triggers, i want to put them in boxes and when the random trigger selects that box, it copies all its units to a new location.

I can think of a few ways to do it but they're pretty tedious. Isn't there a simple way I'm missing? I'm pretty rusty at SC mapmaking these days. The only ways I can think of are to move each unit 1 by 1 to a copy location, copy it, then move it to a finished location, then when its all done move it back. I could also copy each unit then give it to a certain comp player, then when they're all given away, give them all back and finish. But i really hope there's an easy way to instantly copy units.



None.

Mar 18 2012, 12:40 pm Azrael Post #6



Quote from DrZygote214
I can think of a few ways to do it but they're pretty tedious. Isn't there a simple way I'm missing? I'm pretty rusty at SC mapmaking these days. The only ways I can think of are to move each unit 1 by 1 to a copy location, copy it, then move it to a finished location, then when its all done move it back. I could also copy each unit then give it to a certain comp player, then when they're all given away, give them all back and finish. But i really hope there's an easy way to instantly copy units.

No, those are your two best options ^^ There is no "Create X unit" where X is variable, you have to specifically name each unit you want to create, so you'll have to have a trigger for each type of unit which it's possible to copy.




Mar 18 2012, 2:14 pm DrZygote214 Post #7



Thanks for the help so far. I think I'm ready to delve into the tedious combo triggers now. But there's at least 1 more quick thing that came up:

When a player leaves, I want all his units to transfer to the other teammate. This cannot be handled in the trigger that activates victory/defeat. I'm talking about when a player leaves in the middle of the game.

In other words, what condition do i use to check if a player has left the game?



None.

Mar 18 2012, 2:57 pm Jesusfreak Post #8



To check if a player's left a game, you could have some invincible, immobile things off to the side, one owned by each player. If a player leaves, everything he owns will go to neutral (P12), and I think you can simply use a trigger to detect whether P12 has brought anything to a certain location (you can have this trigger be owned by the computer player you've already set out).

Probably not the most efficient way to do it, but it works.



None.

Mar 18 2012, 2:58 pm Azrael Post #9



Trigger
Players
  • Player 1
  • Conditions
  • Always
  • Actions
  • Set Switch 1

  • Trigger
    Players
  • Player 1
  • Conditions
  • Current Player commands exactly 0 any unit
  • Actions
  • Clear Switch 1

  • Trigger
    Players
  • Player 2
  • Conditions
  • Switch 1 is set
  • Player 12 (Neutral) commands at least 1 any unit
  • Player 1 commands exactly 0 any unit
  • Actions
  • Give all any unit owned by Player 12 (Neutral) to Current player

  • Make a set of these for each player and that's pretty much it.

    Actually, I'll just write up a set for you quickly so you can see what they look like.

    Triggers

    You can actually copy/paste that right at the end of the trigger list in your map if the following things are all true:

    • P1 and P2 are on their own force
    • P3 and P4 are on their own force
    • You are not using the Cantina death count already

    I used death counts instead of switches since they are better in pretty much every way (except the ability to randomize). I also added in triggers which detect if a person from both teams leaves simultaneously (which would happen if someone from each team dropped at the same time, for instance). In that case, there's no way to differentiate which units originally belonged to who, so it will remove them instead.

    Edit: The "Detect No Units (P1)" trigger assumes it is possible to ever command 0 units.

    If it is impossible for a player to ever have no units (like if there are invincible units owned by them), then you can remove the following section of triggers:

    Triggers


    Post has been edited 1 time(s), last time on Mar 18 2012, 3:16 pm by Azrael.




    Mar 18 2012, 6:01 pm TiKels Post #10



    A wait block is caused by SC's inability to run more than one wait per player. So if you have two triggers:

    Trigger
    Players
  • Player 1
  • Conditions
  • Always
  • Actions
  • Wait 6000
  • Create 1 marine


  • Trigger
    Players
  • Player 1
  • Conditions
  • Always
  • Actions
  • Wait 10
  • Create Medic


  • In this instance, assuming the triggers are written in this order, A marine will be made 6000 milliseconds in, and a medic will be made 6010 milliseconds in. This is a wait block.



    "If a topic that clearly interest noone needs to be closed to underline the "we don't want this here" message, is up to debate."

    -NudeRaider

    Mar 18 2012, 8:09 pm Lanthanide Post #11



    Quote from Azrael
    Trigger
    Players
  • Player 1
  • Conditions
  • Current Player commands exactly 0 any unit
  • Actions
  • Clear Switch 1
  • This won't work, because players that have left the game do not execute triggers.

    You need to have this trigger owned by some player that is always in the game, ideally your P8 computer.



    None.

    Mar 18 2012, 9:01 pm Azrael Post #12



    Quote from Lanthanide
    This won't work, because players that have left the game do not execute triggers.

    This will work, because the entire point of that trigger is to deactivate the system for Player 1 if he has no units before leaving the game :wtfage:

    Hence the name "Detect No Units (P1)".

    You know, since otherwise it would obviously confuse Player 1 losing all their units as Player 1 leaving the game.

    So yes, it will work perfectly fine. In fact, it won't work unless it's for the player in question, because it's specifically detecting that the player is still present but with no units.

    The fact that I posted a set of flawless working triggers along with the explanation, which can be pasted directly into SCMDraft2 without any issue, and even elaborated on that particular trigger's functionality in an earlier edit, should have been more than enough supplemental material to understand how the system works.




    Mar 18 2012, 9:36 pm rockz Post #13

    ᴄʜᴇᴇsᴇ ɪᴛ!

    Quote from Lanthanide
    You need to have this trigger owned by some player that is always in the game, ideally your P8 computer.
    To clarify, the 1st trigger runs when player 1 is in game. The 2nd trigger runs when player 1 is in game, but mysteriously has no units. The 3rd trigger runs when player 1 was in the game, but now leaves (thus the switch is on, unless he had no units). It will, however, happen repeatedly, so it needs one more condition to reset the switch.



    "Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

    Mar 18 2012, 9:39 pm Lanthanide Post #14



    Right, thanks rockz, that was my problem with it.

    I simply saw the trigger with the 'clear switch' and saw it was P1 and therefore would never run after they left. When I tried to write a reply I couldn't put my finger on why the triggers as presented were wrong.



    None.

    Mar 18 2012, 9:42 pm Azrael Post #15



    Quote from rockz
    Quote from Lanthanide
    You need to have this trigger owned by some player that is always in the game, ideally your P8 computer.
    To clarify, the 1st trigger runs when player 1 is in game. The 2nd trigger runs when player 1 is in game, but mysteriously has no units. The 3rd trigger runs when player 1 was in the game, but now leaves (thus the switch is on, unless he had no units). It will, however, happen repeatedly, so it needs one more condition to reset the switch.

    To clarify further, there are no preserve triggers, so no it won't, and no it doesn't.

    The triggers as presented work perfectly fine. A set of working triggers following that exact design were even included. The only difference is I replaced setting and clearing a switch with setting a death count to 1 and 0.

    You can paste them into SCMDraft2, compile, save, and test it on Bnet.

    Honestly, this is ridiculous. Stop giving the original poster false information. These triggers work, and the design is simple and efficient.




    Mar 18 2012, 9:42 pm Lanthanide Post #16



    It's good house-keeping to clean up your switches when they're no longer needed.

    It's also impossible to tell that your trigger doesn't include a preserve action, because the other two triggers don't have preserve actions either, when they most likely should. In the case where P1 has 5 units, then 0, then 5 units, your triggers break because there's no preserve.

    Post has been edited 1 time(s), last time on Mar 18 2012, 9:49 pm by Lanthanide.



    None.

    Mar 18 2012, 9:54 pm NudeRaider Post #17

    We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

    Quote from Azrael
    I believe that setting the hyper triggers to Player 8 and moving them to the bottom of the trigger list stops wait blocks from occurring.
    Quote from Azrael
    Quote from DrZygote214
    Okay ill try it with comp P8 with 4 hyper triggers.

    Yeah, that'll definitely work without any problems.
    I haven't read much else, but I'd like to comment on that. So please excuse me if what I'm adding has already been said.

    Giving hypers to computers doesn't make a difference per-se. The difference is that computer players often do not need to posess waits and that they are always present (if not defeated). For example transmissions (which contain waits) are of no use for them. That said, giving hypers to computer players without waits is the same as giving the hypers to a human player without waits that doesn't leave. In that scenario (hypers owned by just one player) there is no need to move the hypers to the bottom of the trigger list.

    However, in some maps the creator decides that each and every of his players will have triggers with waits. This is where you move the hypers to the end of the trigger list and give them to All Players. And here's why:
    What moving to the end does is that first the trigger containing a wait is run normally, but now there's a wait running, so the hyper trigger can't be run as well and thus will be blocked. In short, the wait trigger will execute, while the hyper will be blocked.
    Of course you still want the hyper effect to be active when you're running a wait, so what you do is give the hyper triggers not just to one player but to All Players. This means when one player's hypers are blocked there's still up to 7 other players that will act as a backup. Thus only if all players are running a wait at the same time the hyper effect will be disabled, which is good enough in almost all cases.

    P.S. What I just said requires to know that wait blocks can not occur cross player, meaning 2 simultaneous waits won't block each other when they're run by different players.

    Post has been edited 1 time(s), last time on Mar 18 2012, 10:25 pm by NudeRaider. Reason: missed a quote




    Mar 18 2012, 10:01 pm Azrael Post #18



    Quote from Lanthanide
    It's also impossible to tell that your trigger doesn't include a preserve action, because the other two triggers don't have preserve actions either, when they most likely should. In the case where P1 has 5 units, then 0, then 5 units, your triggers break because there's no preserve.

    That is not the case in at least 99% of maps. In most maps it isn't even possible to hit 0 units at all, which is why I included the edit in the original post telling him how to edit the provided triggers in the event it isn't possible for a player to hit 0 units.

    These triggers would only work in his specific map. They are designed based on what he needs and the players he's using and the setup he has. They can be further modified to fit the specifics of his gameplay. I'm sure he will reply with more details about his map, specifically if players can even hit 0 units or not, and then additional changes can be made as necessary, if necessary.

    Post has been edited 1 time(s), last time on Mar 18 2012, 10:07 pm by Azrael. Reason: Added quote.




    Mar 18 2012, 10:09 pm JaFF Post #19



    Quote from Azrael
    I believe that setting the hyper triggers to Player 8 and moving them to the bottom of the trigger list stops wait blocks from occurring.
    This will not help against wait blocks. Not using waits at all or using them very carefully are the only ways.



    None.

    Mar 18 2012, 10:17 pm Azrael Post #20



    Quote from JaFF
    Not using waits at all or using them very carefully are the only ways.
    Quote from Azrael
    However, I would recommend simply not using waits, as they are far less functional and versatile than death count timers.

    Sounds good to me :P I never use waits anymore, and it's certainly a lot better this way.

    Oh yeah, something I wanted to bring up earlier. I don't use Transmission much, but I've been told it functions the same as a Wait.




    Options
      Back to forum
    Please log in to reply to this topic or to report it.
    Members in this topic: None.
    [03:27 am]
    m.0.n.3.y -- Maybe because it's an EUD map?
    [03:27 am]
    m.0.n.3.y -- Can't upload maps to the DB. Error says "The action you have performed caused an Error". Any word?
    [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
    Please log in to shout.


    Members Online: Roy, RIVE, NudeRaider