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.
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage

      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