• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Does a loop continue after a run subroutine?

Status
Not open for further replies.
Level 13
Joined
Mar 24, 2010
Messages
950
ok so i have this trigger and want it to run another trigger when conditions are met.

  • For each (Integer A) from 1 to 4, do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CTF_Team_Points[(Integer A)] Greater than or equal to CTF_Points_Cap
        • Then - Actions
          • Set Vote_Count[1] = (Integer A)
          • Game - Display to (All players) for 20.00 seconds the text: (Team + ((String((Integer A))) + is the |cffffcc00WINNER!|r))
          • Trigger - Run CTF End Game <gen> (checking conditions)
        • Else - Actions
My question is after i run this trigger End Game <gen> and i also use intA loops in there that sometimes seem to not work, but i use waits in the end game trigger.
So when i use waits does the first loop still finish running or does it wait for the whole trigger to finish before it continues again?

  • Game - Display to (All players) for 3.00 seconds the text: 3...
  • Wait 1.00 seconds
  • Game - Display to (All players) for 3.00 seconds the text: 2...
  • Wait 1.00 seconds
  • Game - Display to (All players) for 3.00 seconds the text: 1...
  • Wait 1.00 seconds
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • Vote_Count[1] Equal to 1
    • Then - Actions
      • Trigger - Run CTF Team1 wins <gen> (ignoring conditions)
      • For each (Integer A) from 1 to 3, do (Actions)
        • Loop - Actions
          • Game - Victory (Player((Integer A))) (Show dialogs, Show scores)
      • For each (Integer A) from 4 to 12, do (Actions)
        • Loop - Actions
          • Game - Defeat (Player((Integer A))) with the message: FAILURE!
    • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Vote_Count[1] Equal to 2
        • Then - Actions
          • Game - Display to (All players) for 12.00 seconds the text: TEAM 2 TRIGGERS ...
          • For each (Integer A) from 4 to 6, do (Actions)
            • Loop - Actions
              • Game - Victory (Player((Integer A))) (Show dialogs, Show scores)
          • Game - Defeat Player 1 (Red) with the message: FAILURE!
          • Game - Defeat Player 2 (Blue) with the message: FAILURE!
          • Game - Defeat Player 3 (Teal) with the message: FAILURE!
          • For each (Integer A) from 7 to 12, do (Actions)
            • Loop - Actions
              • Game - Defeat (Player((Integer A))) with the message: FAILURE!
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Vote_Count[1] Equal to 3
            • Then - Actions
              • For each (Integer A) from 1 to 6, do (Actions)
                • Loop - Actions
                  • Game - Defeat (Player((Integer A))) with the message: FAILURE!
              • Game - Defeat Player 10 (Light Blue) with the message: FAILURE!
              • Game - Defeat Player 11 (Dark Green) with the message: FAILURE!
              • Game - Defeat Player 12 (Brown) with the message: FAILURE!
              • For each (Integer A) from 7 to 9, do (Actions)
                • Loop - Actions
                  • Game - Victory (Player((Integer A))) (Show dialogs, Show scores)
            • Else - Actions
              • For each (Integer A) from 1 to 9, do (Actions)
                • Loop - Actions
                  • Game - Defeat (Player((Integer A))) with the message: FAILURE!
              • For each (Integer A) from 10 to 12, do (Actions)
                • Loop - Actions
                  • Game - Victory (Player((Integer A))) (Show dialogs, Show scores)
 
Status
Not open for further replies.
Top