Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Countdown Timer wont start a second time, how to fix???
Countdown Timer wont start a second time, how to fix???
Apr 28 2017, 10:14 am
By: IdealIdeas  

Apr 28 2017, 10:14 am IdealIdeas Post #1



The map im making is my own Allied Commander map, its based off the shuttle escape one with some differences. I got EVERYTHING else working but this freaking Countdown timer that helps players know when a shuttle is about to launch, will not run more than once.

In this trigger setup I do have a command that sets Player 7 Alan Turret to 6 for the first time to start it.
Here are extra details:
Player 7 Alan Turret forces the following commands to run one after the other.
Player 6 Alan Turret is basically the same as Alan Turret for Player 7
Player 8 Cave is the number of waves its on
Player 8 Alan Turret is the randomized race that was chosen. 1= Terran, 2= Zerg, 3= Protoss
There is only ever 1 shuttle owned by player 6 and/or 7 at a time.
Switch 10-15 Randomize themselves to pick which of the 3 shipyards they spawn at, which of the 3 warpgates they are to go to and which of the 3 base exits the land units spawn at. These randomize whenever 10/11, 12/13, or 14/15 are both Cleared.

There are many many triggers to handle all the randomness, but here is a cut down version of what everything does. Most of the triggers are copied the exact same way except they spawn the units at different locations or make them attack different locations and are based off what race player 8 is.

Triggername
Players

  • Player 8
  • Conditions

  • Player 7 has suffered at least 6 deaths of Alan Turret.
  • Player 8 Has suffered at most 9 deaths of Cave
  • Countdown timer is exactly 0 seconds
  • Player 7 brings exactly 0 Escape Shuttle to Anywhere
  • Player 6 brings exactly 0 Escape Shuttle to Anywhere
  • Switch 04 is Set
  • Actions

  • Modify Countdown Timer: Set to 300 Seconds
  • Modify death counts for Player 7: Set to 0 Alan Turret
  • Modify death counts for Player 6: Set to 0 Alan Turret
  • Modify death counts for Player 8: Add 1 for Cave
  • Preserve Trigger

  • Triggername
    Players

  • Player 8
  • Conditions

  • Switch 10 is Set
  • Switch 11 is Cleared
  • Player 7 has suffered exactly 0 deaths of Alan Turret
  • Countdown timer is exactly 0 seconds
  • Actions

  • Create 1 Escape Shuttle at [Enemy] Shuttle Left for Player 7
  • Modify death counts for player 7: Set to 1 for Alan Turret
  • Preserve Trigger
  • Comment:Spawn Shuttle Left Player 7

  • Triggername
    Players

  • Player 8
  • Conditions

  • Switch 10 is Set
  • Switch 11 is Cleared
  • Player 7 has suffered exactly 1 deaths of Alan Turret
  • Player 8 has suffered exactly 1 deaths of Alan Turret
  • Player 8 has suffered at most 5 deaths of Cave
  • Actions

  • Create 2 Terran Wraith at [Enemy] Shuttle Left for Player 7
  • Create 1 Terran Valkyrie at [Enemy] Shuttle Left for Player 7
  • Create 1 Terran Science Vessel at [Enemy] Shuttle Left for Player 7
  • Modify death counts for Player 7: Set to 2 for Alan Turret
  • Preserve Trigger
  • Comment:Shuttle Spawn Terran Left Weak Player 7

  • Triggername
    Players

  • Player 8
  • Conditions

  • Player 7 has suffered exactly 2 deaths of Alan Turret
  • Actions

  • Create 1 Terran Missile Turret at [Timer] Spawn Land for Player 5 at 2% Hp
  • Modify death counts for Player 7: Set to 3 for Alan Turret
  • Preserve Trigger
  • Comment:Set Time For Land Spawn

  • Triggername
    Players

  • Player 8
  • Conditions

  • Player 7 has suffered exactly 3 deaths of Alan Turret
  • Switch 12 is Set
  • Switch 13 is Cleared
  • Actions

  • Issue order to all Escape Shuttle owned by Player 7 at Anywhere: Move to [Warpgate] Left
  • Issue order to all Escape Shuttle owned by Player 6 at Anywhere: Move to [Warpgate] Right
  • Modify death counts for Player 7: Set to 4 for Alan Turret
  • Modify death counts for player 6: Set to 4 for Alan Turret
  • Preserve Trigger
  • Comment:Send Shuttles To Warpgate Left || Right

  • Triggername
    Players

  • Player 8
  • Conditions

  • Player 5 brings exactly 0 Terran Missile Turret to [Timer] Spawn Land
  • Player 7 has suffered exactly 4 deaths of Alan Turret
  • Player 8 has suffered exactly 1 deaths of Alan Turret
  • Player 8 has suffered at most 3 deaths of Cave
  • Switch 14 is Set
  • Switch 15 is Cleared
  • Actions

  • Create 6 Terran Marine at [Enemy] Spawn Left for Player 7
  • Modify death counts for Player 7: Set to 5 for Alan Turret
  • Preserve Trigger
  • Comment:Spawn Land Terran Left Player 7 Weak

  • Triggername
    Players

  • Player 8
  • Conditions

  • Player 7 has suffered exactly 5 deaths of Alan Turret
  • Switch 12 is Set
  • Switch 13 is Cleared
  • Player 5 brings exactly 0 Terran Missile Turret to [Timer] Spawn Land
  • Actions

  • Issue order to all Terran Marine owned by Player 7 at Anywhere: Attack to [Warpgate] Left (This repeats for various other units)
  • Issue order to all Terran Marine owned by Player 6 at Anywhere: Attack to [Warpgate] Right (This repeats for various other units)
  • Clear Switch 10
  • Clear Switch 11
  • Clear Switch 12
  • Clear Switch 13
  • Clear Switch 14
  • Clear Switch 15
  • Modify death counts for Player 7: Set to 6 for Alan Turret
  • Preserve trigger
  • Comment: Send Land Waves 01



  • Now it does all this, but then the countdown timer doesnt start again after the shuttles have been removed from the map once they reach their target or have been killed. Whats going on?! Ive been frustrated for a good week now trying to get this damn countdown timer to work multiple times.
    Ive tried multiple different ways to get the timer to work, but it doesnt. What am I missing????

    Post has been edited 1 time(s), last time on Apr 28 2017, 10:38 am by IdealIdeas.



    None.

    Apr 28 2017, 1:32 pm NudeRaider Post #2

    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

    Without trying to analyze all the conditions, actions and their interactions, how about you narrow down the problem? Either remove conditions on the countdown trigger 1 by 1 or make test triggers right above it where you test 1 condition and put out a display text or some other noticeable mark.




    Apr 28 2017, 3:37 pm Zoan Post #3

    Math + Physics + StarCraft = Zoan

    I just skimmed through your conditions, and as posted none of these triggers will ever execute.

    I don't know how you expect us to figure out what the problem is.



    \:rip\:ooooo\:wob\:ooooo \:angel\: ooooo\:wob\:ooooo\:rip\:

    Apr 28 2017, 6:34 pm IdealIdeas Post #4



    Quote from Zoan
    I just skimmed through your conditions, and as posted none of these triggers will ever execute.

    I don't know how you expect us to figure out what the problem is.

    Would It help if I upload the map? there are quite a few triggers though. but they are all nicely labeled and for the most part laid out nicely.

    I can also give a link to my Googledocs sheet that lists pretty much what every switch, and death count deals with

    Attachments:
    Allied Commanders Beta 3.scx
    Hits: 0 Size: 183.57kb

    Post has been edited 1 time(s), last time on Apr 28 2017, 6:39 pm by IdealIdeas.



    None.

    Apr 30 2017, 6:49 am IdealIdeas Post #5



    Quote from NudeRaider
    Without trying to analyze all the conditions, actions and their interactions, how about you narrow down the problem? Either remove conditions on the countdown trigger 1 by 1 or make test triggers right above it where you test 1 condition and put out a display text or some other noticeable mark.

    I found the issue! In the countdown trigger it looks to see if Player 8's death count for "Cave" is at most 9, and then in the actions it adds +1 to player 8's death counter on "Cave". For some reason it doesnt like this and will not work. Im not using Hyper Triggers if you think that could of been the cause.

    Ive even copied/pasted the triggers from the text trigger editor version to notepad to see if anything else was using Player 8 Cave and nothing was.

    Im kinda dumbfounded as to why that specific condition wont work right,

    Im going to try using buildings as a means of counting waves and see if that resolves the issue.


    Update: Using buildings as a means of counting doesnt seem to work either. The condition for the countdown timer trigger being that there must at least 1 "Wave Count", and then kills 1 in the actions. This time it runs for about 2-3 cycles and just stops. All the other conditions are being met as well.

    Post has been edited 1 time(s), last time on Apr 30 2017, 7:57 am by IdealIdeas.



    None.

    Apr 30 2017, 8:56 am NudeRaider Post #6

    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

    So you're saying on map initialization Cave = 0, Countdown = 0 the trigger fires, sets Cave to 1 and Countdown to 5 minutes. But when the Countdown has reached 0 again, it doesn't start wave 2? Or are you saying wave 2 gets started - all the units appear, cave is set correctly - but the player will never see a new countdown timer?

    And then you said Cave is the culprit, but didn't elaborate. Are you saying Cave is somehow not at 1 but above 9?
    If so none of the triggers you posted should be responsible. Check your full set of trigger for manipulations of Cave.

    Post has been edited 1 time(s), last time on Apr 30 2017, 9:03 am by NudeRaider.




    Apr 30 2017, 9:40 am IdealIdeas Post #7



    Quote from NudeRaider
    So you're saying on map initialization Cave = 0, Countdown = 0 the trigger fires, sets Cave to 1 and Countdown to 5 minutes. But when the Countdown has reached 0 again, it doesn't start wave 2? Or are you saying wave 2 gets started - all the units appear, cave is set correctly - but the player will never see a new countdown timer?
    And then you said Cave is the culprit, but didn't elaborate. Are you saying Cave is somehow not at 1 but above 9?
    If so none of the triggers you posted should be responsible. Check your full set of trigger for manipulations of Cave.

    Countdown Timer
    Players

  • Player 8
  • Conditions

  • Player 7 has suffered at least 6 deaths of Alan Turret.
  • Player 8 Has suffered at most 9 deaths of Cave
  • Countdown timer is exactly 0 seconds
  • Player 7 brings exactly 0 Escape Shuttle to Anywhere
  • Player 6 brings exactly 0 Escape Shuttle to Anywhere
  • Switch 04 is Set
  • Actions

  • Modify Countdown Timer: Set to 300 Seconds
  • Modify death counts for Player 7: Set to 0 Alan Turret
  • Modify death counts for Player 6: Set to 0 Alan Turret
  • Modify death counts for Player 8: Add 1 for Cave
  • Preserve Trigger


  • Ill try my best to explain everything.

    Ok so its not at map initialization. The countdown starts when switch 04 is set. Switch 04 gets set when both players select their desired commander. BUT, nothing touches the death count for Player 8 Cave between picking a commander and starting the countdown timer. So Player 8 Cave = 0 when Countdown Timer goes into effect.

    The only trigger that modifies Player 8 Cave is the countdown timer trigger (Shown Above). I can confirm no other trigger modifies the value for it. I even double checked by copy/pasting the SCMDraft trigger editor into notepad and using Ctrl+F to look for the word Cave.


    When this countdown timer trigger activates for the first time, once it hits 0 seconds, everything works. The units spawn including the important one, the "Escape Shuttle", and they are sent to their destinations.

    As the units get spawned and have their actions done via other triggers, the Death Counts for Player 6 and 7 Alan Turret tick up 1 by one till they get to the final trigger in the line which sets it so the countdown timer can start again, these Alan Turret death counts help insure the triggers get ran in order as some have to wait for timers to clear. I have checked every trigger that modifies these 2 values and they are all correctly set. I also have 1 time trigger that sets Player 7 Alan Turret to = 6, before the countdown timer trigger so it fires the first time.

    After the "Escape Shuttle" either makes it to the Warpgate, or gets destroyed, the countdown timer should then be free to start its 2nd cycle because Player 7 and Player 6 will have 0 "Escape Shuttles", but it doesnt.

    You told me to try removing a condition 1 at a time to see if it will start running again. So I removed "Player 8 Has suffered at most 9 deaths of Cave", and the trigger started working without issue, it ran multiple times and the following triggers worked as well. But I need this condition as it counts the number of waves. 10 being the last shuttle wave for it to send. When Cave = 10, this countdown timer should then stop working. I dont know if its a glitch or something, but maybe this Countdown Timer trigger is adding more than +1 to the point that it = more than 9.

    The only other triggers that use Player 8 cave are some triggers down the line and even then its only in the conditions as I have triggers that spawn more units when Cave ≥ 5.



    None.

    Apr 30 2017, 9:53 am NudeRaider Post #8

    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

    This seems to contradict itself. (No trigger modifying Cave, the trigger seems to do what it's supposed to do with cave, but yet cave is the problem.) Can you put test triggers that keep track of Cave? Best done before and after the above trigger so you see how its value changes and more importantly when it changes to something unexpected.

    For now the only explanation I have is that the trigger runs multiple times, adding more than just 1 to cave. But since you say no hypers and the countdown timer is a condition this also doesn't make sense. Unless ... do you have waits or transmissions? Those make all/a lot of triggers run again and the change in countdown timer isn't immediate.

    To rule out such problems you could add another condition/switch that gets set when the trigger has run once for the current wave.




    Options
      Back to forum
    Please log in to reply to this topic or to report it.
    Members in this topic: None.
    [11:50 pm]
    O)FaRTy1billion[MM] -- nice, now i have more than enough
    [11:49 pm]
    O)FaRTy1billion[MM] -- if i don't gamble them away first
    [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?
    [2024-4-17. : 1:08 am]
    O)FaRTy1billion[MM] -- i'll trade you mineral counts
    [2024-4-16. : 5:05 pm]
    Vrael -- Its simple, just send all minerals to Vrael until you have 0 minerals then your account is gone
    [2024-4-16. : 4:31 pm]
    Zoan -- where's the option to delete my account
    [2024-4-16. : 4:30 pm]
    Zoan -- goodbye forever
    Please log in to shout.


    Members Online: Dem0n, lil-Inferno