Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Preserve Trigger not preserving?!?
Preserve Trigger not preserving?!?
Sep 10 2017, 8:46 pm
By: bulletbutter  

Sep 10 2017, 8:46 pm bulletbutter Post #1



The trigger below....I can get it to fire multiple times if I copy it but.....preserve trigger should be taking care of that but it doesn't appear to be.
Also, it will only ever fire the first action and appears to skip eveything after the first action.

Move guys
Players

  • Player 1
  • Conditions

  • Current Player bring 1 [any unit] to 'General Dump'
  • Actions

  • Move All [any unit] for Current Player at 'General Dump' to 'P1 Spawn'
  • Center View for current player at 'P1 Spawn'
  • Display for current player: "working"
  • Preserve Trigger
  • Comment: Move stuff


  • I can kinda understand why it would be only doing the first action. It moves the unit (because thats what the first action says) then it makes the condition false, so the following 2 actions dont fire. And I've tried re-ordering each of the actions but nothing changes. I was under the impression that if the condition was true (no matter for how long), all actions will be executed. Are hyper triggers seriously causing the last 2 actions from firing? Any why is it not preserving trigger when I obviously have it in there? Am I missing something?



    None.

    Sep 10 2017, 10:09 pm DarkenedFantasies Post #2

    Roy's Secret Service

    It's indeed caused by the hyper triggers, but that's because your hypers are not the "last" triggers in the list. Give your 'Move stuff' trigger to the player(s) who own the hypers, then move it to be above the hypers (and give it back to Player 1).

    Or alternatively, delete your hypers and recreate them...




    Sep 11 2017, 1:40 am Dem0n Post #3

    ᕕ( ᐛ )ᕗ

    An important thing to remember that I think a lot of beginner mappers don't realize is that the triggers run in order, one fully before the next, starting with player 1 and ending with player 8. That means that if the condition for a trigger is true, it will run all actions in the order they're in, regardless of if that condition stops being true midway through. The triggers don't check the conditions against each action; once a condition is true, all actions will run in order, and then it will move onto the next trigger.




    Sep 11 2017, 3:55 am Ahli Post #4

    I do stuff and thingies... Try widening and reducing the number of small nooks and crannies to correct the problem.

    Your problem only occurs in singleplayer games and not in multiplayer ones due to "center view" only performing a wait only in the game's singleplayer mode.

    As Demon already described, you are experiencing wait blocks where one wait is blocked by other waits. Since your action never appears, it is likely that this is caused by your hypertriggers' position in the trigger list. (The order of triggers matters!)
    To fix the issue, move your hypertriggers to the very end of the trigger list while having triggers visible for each player, forces and all players.




    Sep 19 2017, 1:47 am mentalmp11 Post #5



    A quick fix to this I like to do something is put a wait 1 millisecond after displaying text and center view and before the move unit trigger. Seems to work. Meh.

    Player brings to X

    Displaytext
    Centerview
    Minimapping
    wait 1 ms
    MoveUnit
    PreserverTrigger
    Comment: Woot



    None.

    Sep 19 2017, 2:15 am Roy Post #6

    An artist's depiction of an Extended Unit Death

    Quote from mentalmp11
    A quick fix to this I like to do something is put a wait 1 millisecond after displaying text and center view and before the move unit trigger. Seems to work. Meh.

    Player brings to X

    Displaytext
    Centerview
    Minimapping
    wait 1 ms
    MoveUnit
    PreserverTrigger
    Comment: Woot
    That's not necessary. If a trigger's conditions are met, all actions are executed*, even if an action invalidates a condition. The reason it seemed to stop executing actions in bulletbutter's case is because trigger was hanging on a wait block (single-player Center View), and adding another wait to the trigger would not solve anything in the same setup that causes this issue.

    Shoutout to The Hyper Trigger, which doesn't do a hard block like traditional hyper triggers.

    *Unless the trigger owner leaves the game mid-execution.




    Sep 19 2017, 2:59 am mentalmp11 Post #7



    I always give the traditional hypers to a seperate force that only contains the hypers and nothing much else. I tend to think this makes things easier to work with. I know when I give hypers to a force that contains any other waits at certain times it does indeed screw with things.



    None.

    Options
      Back to forum
    Please log in to reply to this topic or to report it.
    Members in this topic: None.
    [01:39 am]
    Ultraviolet -- no u elky skeleton guy, I'll use em better
    [10:50 pm]
    Vrael -- Ultraviolet
    Ultraviolet shouted: How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
    hey cut it out I'm getting all the minerals
    [10:11 pm]
    Ultraviolet -- :P
    [10:11 pm]
    Ultraviolet -- How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
    [2024-4-17. : 11:50 pm]
    O)FaRTy1billion[MM] -- nice, now i have more than enough
    [2024-4-17. : 11:49 pm]
    O)FaRTy1billion[MM] -- if i don't gamble them away first
    [2024-4-17. : 11:49 pm]
    O)FaRTy1billion[MM] -- o, due to a donation i now have enough minerals to send you minerals
    [2024-4-17. : 3:26 am]
    O)FaRTy1billion[MM] -- i have to ask for minerals first tho cuz i don't have enough to send
    [2024-4-17. : 1:53 am]
    Vrael -- bet u'll ask for my minerals first and then just send me some lousy vespene gas instead
    [2024-4-17. : 1:52 am]
    Vrael -- hah do you think I was born yesterday?
    Please log in to shout.


    Members Online: Roy