Trigger - Wait for Condition Problem

SwedishChef

New Member
Reaction score
32
Okey, I tested my map today but someone it had this big bug in it. I checked it up and it seems like there is problem with a wait for condition action. Check the trigger. The wait is in the middle of the trigger. First the "For each integer" checks which value a variable of mine has and then runs a movie-trigger depending on the value.

Problem is when I played this trigger ran the right movie-trigger as is should but then skipped the wait and continued without the "Wait until (ArenaMovieOn[(Integer A)] Equal to False..." wait. I don't understand since the ArenaMovieOn bolean is initially set to true and I even added a trigger which runs on Map Initialization setting ArenaMovieOn to true.

So any guess what's happening here? If you want I can cut off some of the action in the start since they basically does nothing. But could be good to have the whole trigger.

Trigger:
  • Arena
    • Events
    • Conditions
    • Actions
      • Set ArenaCount = (ArenaCount + 1)
      • Set MyLocation = (Center of Arena <gen>)
      • Player Group - Pick every player in All_Players and do (Actions)
        • Loop - Actions
          • Hero - Instantly revive Hero[(Player number of (Picked player))] at MyLocation, Hide revival graphics
      • Custom script: call RemoveLocation(udg_MyLocation)
      • Set ArenaFacing = (Center of Arena Face Point <gen>)
      • Trigger - Turn on First Blood <gen>
      • Trigger - Turn on Hero Dies <gen>
      • Set MyLocation = (Random point in Arena Visitors <gen>)
      • Unit - Create 1 Villager (Male 2) for Neutral Passive at MyLocation facing ArenaFacing
      • Custom script: call RemoveLocation(udg_MyLocation)
      • Set MyLocation = (Random point in Arena Visitors <gen>)
      • Unit - Create 1 Villager (Male) for Neutral Passive at MyLocation facing ArenaFacing
      • Custom script: call RemoveLocation(udg_MyLocation)
      • Set MyLocation = (Random point in Arena Visitors Copy <gen>)
      • Unit - Create 1 Child (2) for Neutral Passive at MyLocation facing ArenaFacing
      • Custom script: call RemoveLocation(udg_MyLocation)
      • Set MyLocation = (Random point in Arena Visitors Copy <gen>)
      • Unit - Create 1 Villager (Male) for Neutral Passive at MyLocation facing ArenaFacing
      • Custom script: call RemoveLocation(udg_MyLocation)
      • Set MyLocation = (Random point in Arena Visitors Copy <gen>)
      • Unit - Create 1 Child (2) for Neutral Passive at MyLocation facing ArenaFacing
      • Custom script: call RemoveLocation(udg_MyLocation)
      • Player Group - Pick every player in (All players) and do (Camera - Pan camera for (Picked player) to ArenaFacing over 5.00 seconds)
      • Cinematic - Fade out over 5.00 seconds using texture White Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
      • If (RandomArena Equal to True) then do (If ((Random integer number between 1 and 3) Equal to 1) then do (Trigger - Run Arena Init <gen> (checking conditions)) else do (If ((Random integer number between 1 and 2) Equal to 1) then do (Trigger - Run Goblin Land Init <gen> (checking conditions)) else else do (Do nothing)
      • Wait 5.00 seconds
      • Trigger - Run Move Hero <gen> (checking conditions)
      • For each (Integer A) from 1 to 3, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Arenas Equal to (Integer A)
              • ArenaMovieOn[(Integer A)] Equal to True
            • Then - Actions
              • Trigger - Run Movie[(Integer A)] (checking conditions)
              • Wait until (ArenaMovieOn[(Integer A)] Equal to False), checking every 1.00 seconds
            • Else - Actions
      • Player Group - Pick every player in All_Players and do (Actions)
        • Loop - Actions
          • Set MyLocation = (Position of Hero[(Player number of (Picked player))])
          • Camera - Pan camera for (Picked player) to MyLocation over 1.00 seconds
          • Custom script: call RemoveLocation(udg_MyLocation)
      • Cinematic - Fade in over 1.00 seconds using texture White Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
      • Sound - Play ArrangedTeamInvitation <gen>
      • Wait 4.00 seconds
      • Game - Display to (All players) the text: Duel Arena Battle b...
      • Wait 1.50 seconds
      • Game - Display to (All players) the text: 3!
      • Sound - Play BattleNetTick <gen>
      • Wait 1.00 seconds
      • Game - Display to (All players) the text: 2!
      • Sound - Play BattleNetTick <gen>
      • Wait 1.00 seconds
      • Game - Display to (All players) the text: 1!
      • Sound - Play BattleNetTick <gen>
      • Wait 1.00 seconds
      • Game - Display to (All players) the text: START FIGHTING!
      • Set MyUnitGroup = (Units in ArenaRegion)
      • Unit Group - Pick every unit in MyUnitGroup and do (Actions)
        • Loop - Actions
          • Unit - Unpause (Picked unit)
          • Unit - Make (Picked unit) Vulnerable
      • If (Arenas Equal to 2) then do (Trigger - Turn on Mines <gen>) else do (If (Arenas Equal to 3) then do (Trigger - Turn on Impale Point <gen>) else do (Do nothing))
      • Custom script: call RemoveLocation(udg_ArenaFacing)
      • Custom script: call DestroyGroup(udg_MyUnitGroup)
 

SwedishChef

New Member
Reaction score
32
Okey this is one of the three movie triggers. They are essentially the same except for some camera setting and transmissions. Oh and thanks for the quick answer I really hope we can solve this problem today. I got some really excited folks out there waiting for the new version.

Trigger:
  • Normal
    • Events
    • Conditions
      • ArenaMovieOn[1] Equal to True
    • Actions
      • Environment - Set sky to Dalaran Sky
      • Sound - Stop music Immediately
      • Sound - Play PursuitTheme <gen>
      • Set MyUnitGroup = (Units of type Stash)
      • Unit Group - Pick every unit in MyUnitGroup and do (Unit - Hide (Picked unit))
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Environment - Create at Arena_Region[(Integer A)] the weather effect Rays Of Light
          • Environment - Turn (Last created weather effect) On
          • Set SpecialEffect[(Integer A)] = (Last created special effect)
      • Animation - Play Arena Leader 0061 <gen>'s stand victory animation
      • Cinematic - Turn cinematic mode On for (All players)
      • Player Group - Pick every player in (All players) and do (Camera - Apply Arena 1 <gen> for (Picked player) over 0.00 seconds)
      • Cinematic - Fade in over 1.00 seconds using texture White Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
      • Cinematic - Clear the screen of text messages for (All players)
      • Cinematic - Disable user control for (All players)
      • Sound - Play Applauselong <gen>
      • Cinematic - Send transmission to All_Players from Arena Leader 0061 <gen> named Arena Leader: Play No sound and display This is my arena, h.... Modify duration: Set to 5.00 seconds and Wait
      • Cinematic - Send transmission to All_Players from Arena Leader 0061 <gen> named Arena Leader: Play No sound and display Arena_String1[Game_Mode]. Modify duration: Set to 10.00 seconds and Wait
      • Player Group - Pick every player in All_Players and do (Camera - Apply Arena 2 <gen> for (Picked player) over 3.00 seconds)
      • Cinematic - Send transmission to (All players) from Arena Leader 0061 <gen> named Arena Leader: Play No sound and display Now get in there an.... Modify duration: Set to 4.00 seconds and Wait
      • Cinematic - Fade out over 2.00 seconds using texture White Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
      • Wait 2.00 seconds
      • Player Group - Pick every player in All_Players and do (Camera - Reset camera for (Picked player) to standard game-view over 0.00 seconds)
      • Cinematic - Turn cinematic mode Off for (All players)
      • Sound - Stop Applauselong <gen> After fading
      • Unit Group - Pick every unit in MyUnitGroup and do (Unit - Unhide (Picked unit))
      • Cinematic - Enable user control for (All players)
      • Custom script: call DestroyGroup(udg_MyUnitGroup)
      • For each (Integer A) from 1 to 12, do (Environment - Remove WeatherEffect[(Integer A)])
      • Set ArenaMovieOn[1] = False
 

Anachron

New Member
Reaction score
53
Set the default value of
Trigger:
  • ArenaMovieOn[X]
to true, I guess?
Also, before
Trigger:
  • If (RandomArena Equal to True) then do (If ((Random integer number between 1 and 3) Equal to 1) then do

Put one foreach loop and set all ArenaMoveOn[X] to true.
 

SwedishChef

New Member
Reaction score
32
Set the default value of
Trigger:
  • ArenaMovieOn[X]
to true, I guess?
Also, before
Trigger:
  • If (RandomArena Equal to True) then do (If ((Random integer number between 1 and 3) Equal to 1) then do

Put one foreach loop and set all ArenaMoveOn[X] to true.

I have already set true to deafult and cant set all to true every time since I only want it to run once. I will check more later. Fixed a trigger showing when it is set to true.
 

Nenad

~Choco Coronet~ Omnomnom
Reaction score
137
Trigger:
  • # For each (Integer A) from 1 to 3, do (Actions)
    • * Loop - Actions
      • o If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • + If - Conditions
          • # Arenas Equal to (Integer A)
          • # ArenaMovieOn[(Integer A)] Equal to True
        • + Then - Actions
          • # Trigger - Run Movie[(Integer A)] (checking conditions)
          • # Wait until (ArenaMovieOn[(Integer A)] Equal to False), checking every 1.00 seconds
        • + Else - Actions


put this wait outside of the loop, i don't think it's wise to wait inside of the loop.
 

SwedishChef

New Member
Reaction score
32
Trigger:
  • # For each (Integer A) from 1 to 3, do (Actions)
    • * Loop - Actions
      • o If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • + If - Conditions
          • # Arenas Equal to (Integer A)
          • # ArenaMovieOn[(Integer A)] Equal to True
        • + Then - Actions
          • # Trigger - Run Movie[(Integer A)] (checking conditions)
          • # Wait until (ArenaMovieOn[(Integer A)] Equal to False), checking every 1.00 seconds
        • + Else - Actions


put this wait outside of the loop, i don't think it's wise to wait inside of the loop.

Hm okey so you think it will be better if I save the Integer A usinga a integer variable and then put the wait outside? Sure ok I will try.

E: just of couriosity, why would it matter? :p
 

SwedishChef

New Member
Reaction score
32
I just tested and it seems like the trigger dosn't see the wait at all so I will try putting it outside the loop.

E: Putting it outside the loop didn't help. Still skips to the actions after the wait.

I know that they aren't set to false already since I made a trigger to check when arenamovieon turns to false and it does as it is supposed to do after the cinematic.
 

Darkness47

New Member
Reaction score
3
You use integer A into your movie trigger... so the A value changes while waiting until (ArenaMovieOn[(Integer A)] Equal to False

For example, you do
Trigger:
  • For each (Integer A) from 1 to 12, do (Actions)

at the begining of that movie trigger, so when integer A = 4 in this, it also = 4 in the first trigger and your wait ends, because it must consider it false as ArenaMovieOn[4] doesn't exist something like that
 

SwedishChef

New Member
Reaction score
32
You use integer A into your movie trigger... so the A value changes while waiting until (ArenaMovieOn[(Integer A)] Equal to False

For example, you do
Trigger:
  • For each (Integer A) from 1 to 12, do (Actions)

at the begining of that movie trigger, so when integer A = 4 in this, it also = 4 in the first trigger and your wait ends, because it must consider it false as ArenaMovieOn[4] doesn't exist something like that

Yeah but I remade that without success, I will show you.

E: Look now, this is the new trigger I made. The Integer2 is a variable which I use no other place. Still it dosn't work :/

Trigger:
  • Arena
    • Events
    • Conditions
    • Actions
      • Set ArenaCount = (ArenaCount + 1)
      • Set MyLocation = (Center of Arena <gen>)
      • Player Group - Pick every player in All_Players and do (Actions)
        • Loop - Actions
          • Hero - Instantly revive Hero[(Player number of (Picked player))] at MyLocation, Hide revival graphics
      • Custom script: call RemoveLocation(udg_MyLocation)
      • Set ArenaFacing = (Center of Arena Face Point <gen>)
      • Trigger - Turn on First Blood <gen>
      • Trigger - Turn on Hero Dies <gen>
      • Set MyLocation = (Random point in Arena Visitors <gen>)
      • Unit - Create 1 Villager (Male 2) for Neutral Passive at MyLocation facing ArenaFacing
      • Custom script: call RemoveLocation(udg_MyLocation)
      • Set MyLocation = (Random point in Arena Visitors <gen>)
      • Unit - Create 1 Villager (Male) for Neutral Passive at MyLocation facing ArenaFacing
      • Custom script: call RemoveLocation(udg_MyLocation)
      • Set MyLocation = (Random point in Arena Visitors Copy <gen>)
      • Unit - Create 1 Child (2) for Neutral Passive at MyLocation facing ArenaFacing
      • Custom script: call RemoveLocation(udg_MyLocation)
      • Set MyLocation = (Random point in Arena Visitors Copy <gen>)
      • Unit - Create 1 Villager (Male) for Neutral Passive at MyLocation facing ArenaFacing
      • Custom script: call RemoveLocation(udg_MyLocation)
      • Set MyLocation = (Random point in Arena Visitors Copy <gen>)
      • Unit - Create 1 Child (2) for Neutral Passive at MyLocation facing ArenaFacing
      • Custom script: call RemoveLocation(udg_MyLocation)
      • Player Group - Pick every player in (All players) and do (Camera - Pan camera for (Picked player) to ArenaFacing over 5.00 seconds)
      • Cinematic - Fade out over 5.00 seconds using texture White Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
      • If (RandomArena Equal to True) then do (If ((Random integer number between 1 and 3) Equal to 1) then do (Trigger - Run Arena Init <gen> (checking conditions)) else do (If ((Random integer number between 1 and 2) Equal to 1) then do (Trigger - Run Goblin Land Init <gen> (checking conditions)) else else do (Do nothing)
      • Wait 5.00 seconds
      • Trigger - Run Move Hero <gen> (checking conditions)
      • For each (Integer A) from 1 to 3, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Arenas Equal to (Integer A)
              • ArenaMovieOn[(Integer A)] Equal to True
            • Then - Actions
              • Trigger - Run Movie[(Integer A)] (checking conditions)
              • Set Integer2 = (Integer A)
            • Else - Actions
      • Wait until (ArenaMovieOn[Integer2] Equal to False), checking every 1.00 seconds
      • Player Group - Pick every player in All_Players and do (Actions)
        • Loop - Actions
          • Set MyLocation = (Position of Hero[(Player number of (Picked player))])
          • Camera - Pan camera for (Picked player) to MyLocation over 1.00 seconds
          • Custom script: call RemoveLocation(udg_MyLocation)
      • Cinematic - Fade in over 1.00 seconds using texture White Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
      • Sound - Play ArrangedTeamInvitation <gen>
      • Wait 4.00 seconds
      • Game - Display to (All players) the text: Duel Arena Battle b...
      • Wait 1.50 seconds
      • Game - Display to (All players) the text: 3!
      • Sound - Play BattleNetTick <gen>
      • Wait 1.00 seconds
      • Game - Display to (All players) the text: 2!
      • Sound - Play BattleNetTick <gen>
      • Wait 1.00 seconds
      • Game - Display to (All players) the text: 1!
      • Sound - Play BattleNetTick <gen>
      • Wait 1.00 seconds
      • Game - Display to (All players) the text: START FIGHTING!
      • Set MyUnitGroup = (Units in ArenaRegion)
      • Unit Group - Pick every unit in MyUnitGroup and do (Actions)
        • Loop - Actions
          • Unit - Unpause (Picked unit)
          • Unit - Make (Picked unit) Vulnerable
      • If (Arenas Equal to 2) then do (Trigger - Turn on Mines <gen>) else do (If (Arenas Equal to 3) then do (Trigger - Turn on Impale Point <gen>) else do (Do nothing))
      • Custom script: call RemoveLocation(udg_ArenaFacing)
      • Custom script: call DestroyGroup(udg_MyUnitGroup)
 

Darkness47

New Member
Reaction score
3
You Run Movie[A] before u store Interger2, try to store it before you run the movie.

Are you sure your if's conditions are true?

You can also use your Integer2 as the looping variable, and then you can put your wait into the loop as u wanted to do.
 

SwedishChef

New Member
Reaction score
32
That might be it. Thank you, I will try now.

E: And it worked. I love you and everyone who tried to help me.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top