• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Turning Off a trigger...

Status
Not open for further replies.
Level 12
Joined
Apr 16, 2007
Messages
262
Hey Guys!!!

I'm making a cinematic, and have encountered a very annoying problem with the triggers. I am trying to turn off a trigger when I press the escape key, so it does not fire the remaining actions in it.

Here is my current code...
Could somebody tell me how to make the trigger stop working as soon as I press the escape key (the boolean becomes true when the escape key is pressed)... Thanks!!!

  • Introduction Talk
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • skipcine Equal to False
        • Then - Actions
          • Wait (Random real number between 5.00 and 10.00) seconds
          • Animation - Lock Blood Elf Lieutenant 0010 <gen>'s Head to face Blood Elf Lieutenant 0009 <gen>, offset by (0.00, 0.00, 90.00)
          • Cinematic - Send transmission to (All players) from Blood Elf Lieutenant 0010 <gen> named Guard: Play No sound and display SoldierTalkRandomString1. Modify duration: Set to 3.00 seconds and Wait
          • Animation - Reset Blood Elf Lieutenant 0010 <gen>'s body-part facing
          • Sound - Play GarithosYes3 <gen> at 100.00% volume, attached to Blood Elf Lieutenant 0009 <gen>
          • Cinematic - Send transmission to (All players) from Blood Elf Lieutenant 0009 <gen> named Guard: Play No sound and display Suits my Purposes...... Modify duration: Set to 3.00 seconds and Wait
          • Wait (Random real number between 5.00 and 10.00) seconds
          • Animation - Lock Blood Elf Lieutenant 0010 <gen>'s Head to face Blood Elf Lieutenant 0009 <gen>, offset by (0.00, 0.00, 90.00)
          • Cinematic - Send transmission to (All players) from Blood Elf Lieutenant 0010 <gen> named Guard: Play No sound and display SoldierTalkRandomString2. Modify duration: Set to 3.00 seconds and Wait
          • Animation - Reset Blood Elf Lieutenant 0010 <gen>'s body-part facing
          • Sound - Play GarithosYes1 <gen> at 100.00% volume, attached to Blood Elf Lieutenant 0009 <gen>
          • Cinematic - Send transmission to (All players) from Blood Elf Lieutenant 0009 <gen> named Guard: Play No sound and display Its about time!. Modify duration: Set to 3.00 seconds and Wait
          • Wait (Random real number between 5.00 and 10.00) seconds
          • Animation - Lock Blood Elf Lieutenant 0010 <gen>'s Head to face Blood Elf Lieutenant 0009 <gen>, offset by (0.00, 0.00, 90.00)
          • Cinematic - Send transmission to (All players) from Blood Elf Lieutenant 0010 <gen> named Guard: Play No sound and display SoldierTalkRandomString3. Modify duration: Set to 3.00 seconds and Wait
          • Animation - Reset Blood Elf Lieutenant 0010 <gen>'s body-part facing
          • Sound - Play GarithosYes4 <gen> at 100.00% volume, attached to Blood Elf Lieutenant 0009 <gen>
          • Cinematic - Send transmission to (All players) from Blood Elf Lieutenant 0009 <gen> named Guard: Play No sound and display RIght..... Modify duration: Set to 3.00 seconds and Wait
          • Wait (Random real number between 5.00 and 10.00) seconds
          • Animation - Lock Blood Elf Lieutenant 0010 <gen>'s Head to face Blood Elf Lieutenant 0009 <gen>, offset by (0.00, 0.00, 90.00)
          • Cinematic - Send transmission to (All players) from Blood Elf Lieutenant 0010 <gen> named Guard: Play No sound and display SoldierTalkRandomString4. Modify duration: Set to 3.00 seconds and Wait
          • Animation - Reset Blood Elf Lieutenant 0010 <gen>'s body-part facing
          • Sound - Play GarithosYes4 <gen> at 100.00% volume, attached to Blood Elf Lieutenant 0009 <gen>
          • Cinematic - Send transmission to (All players) from Blood Elf Lieutenant 0009 <gen> named Guard: Play No sound and display RIght..... Modify duration: Set to 3.00 seconds and Wait
          • Wait (Random real number between 5.00 and 10.00) seconds
          • Animation - Play Blood Elf Lieutenant 0009 <gen>'s stand 2 animation
          • Unit - Create 1 Disease Cloud for Neutral Passive at ((Position of Blood Elf Lieutenant 0009 <gen>) offset by (0.00, -40.00)) facing (Facing of Blood Elf Lieutenant 0009 <gen>) degrees
          • Set Fart = (Last created unit)
          • Sound - Play OgrePissed5 <gen> at 100.00% volume, attached to Blood Elf Lieutenant 0009 <gen>
          • Wait 0.75 seconds
          • Sound - Stop OgrePissed5 <gen> Immediately
          • Unit - Remove Fart from the game
          • Animation - Lock Blood Elf Lieutenant 0010 <gen>'s Head to face Blood Elf Lieutenant 0009 <gen>, offset by (0.00, 0.00, 90.00)
          • Cinematic - Send transmission to (All players) from Blood Elf Lieutenant 0010 <gen> named Guard: Play No sound and display You disgusting man!!. Modify duration: Set to 3.00 seconds and Wait
          • Animation - Reset Blood Elf Lieutenant 0010 <gen>'s body-part facing
          • Animation - Play Blood Elf Lieutenant 0009 <gen>'s stand 2 animation
          • Unit - Create 1 Disease Cloud for Neutral Passive at ((Position of Blood Elf Lieutenant 0009 <gen>) offset by (0.00, -40.00)) facing (Facing of Blood Elf Lieutenant 0009 <gen>) degrees
          • Set Fart = (Last created unit)
          • Sound - Play OgrePissed5 <gen> at 100.00% volume, attached to Blood Elf Lieutenant 0009 <gen>
          • Wait 0.75 seconds
          • Sound - Stop OgrePissed5 <gen> Immediately
          • Unit - Remove Fart from the game
          • Animation - Lock Blood Elf Lieutenant 0010 <gen>'s Head to face Blood Elf Lieutenant 0009 <gen>, offset by (0.00, 0.00, 90.00)
          • Cinematic - Send transmission to (All players) from Blood Elf Lieutenant 0010 <gen> named Guard: Play No sound and display Ok, thats it!!!. Modify duration: Set to 3.00 seconds and Don't wait
          • Wait 2.50 seconds
          • Animation - Reset Blood Elf Lieutenant 0010 <gen>'s body-part facing
          • Unit - Create 1 Disease Cloud for Neutral Passive at ((Position of Blood Elf Lieutenant 0010 <gen>) offset by (0.00, -40.00)) facing (Facing of Blood Elf Lieutenant 0010 <gen>) degrees
          • Set Fart = (Last created unit)
          • Sound - Play OgrePissed5 <gen> at 100.00% volume, attached to Blood Elf Lieutenant 0010 <gen>
          • Wait 0.75 seconds
          • Sound - Stop OgrePissed5 <gen> Immediately
          • Unit - Remove Fart from the game
        • Else - Actions
          • Skip remaining actions
 
Level 14
Joined
Apr 21, 2007
Messages
1,465
Hmm...I am pretty sure it wasn't once every 0.01 second, it was just Time - Elapsed game time is 0.01 seconds.

The reason somebody told you this is because you can't play sounds on map initialization. Further more you should add the wait between 5 and 10 seconds before the If/Then/Else trigger since you can't hope the player to press escape in the first milisecond.
 
Level 12
Joined
Apr 16, 2007
Messages
262
It isn't working... still.... heres the code again, changed as you said.

  • Introduction Talk
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • Wait (Random real number between 5.00 and 10.00) seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • skipcine Equal to False
        • Then - Actions
          • Wait (Random real number between 5.00 and 10.00) seconds
          • Animation - Lock Blood Elf Lieutenant 0010 <gen>'s Head to face Blood Elf Lieutenant 0009 <gen>, offset by (0.00, 0.00, 90.00)
          • Cinematic - Send transmission to (All players) from Blood Elf Lieutenant 0010 <gen> named Guard: Play No sound and display SoldierTalkRandomString1. Modify duration: Set to 3.00 seconds and Wait
          • Animation - Reset Blood Elf Lieutenant 0010 <gen>'s body-part facing
          • Sound - Play GarithosYes3 <gen> at 100.00% volume, attached to Blood Elf Lieutenant 0009 <gen>
          • Cinematic - Send transmission to (All players) from Blood Elf Lieutenant 0009 <gen> named Guard: Play No sound and display Suits my Purposes...... Modify duration: Set to 3.00 seconds and Wait
          • Wait (Random real number between 5.00 and 10.00) seconds
          • Animation - Lock Blood Elf Lieutenant 0010 <gen>'s Head to face Blood Elf Lieutenant 0009 <gen>, offset by (0.00, 0.00, 90.00)
          • Cinematic - Send transmission to (All players) from Blood Elf Lieutenant 0010 <gen> named Guard: Play No sound and display SoldierTalkRandomString2. Modify duration: Set to 3.00 seconds and Wait
          • Animation - Reset Blood Elf Lieutenant 0010 <gen>'s body-part facing
          • Sound - Play GarithosYes1 <gen> at 100.00% volume, attached to Blood Elf Lieutenant 0009 <gen>
          • Cinematic - Send transmission to (All players) from Blood Elf Lieutenant 0009 <gen> named Guard: Play No sound and display Its about time!. Modify duration: Set to 3.00 seconds and Wait
          • Wait (Random real number between 5.00 and 10.00) seconds
          • Animation - Lock Blood Elf Lieutenant 0010 <gen>'s Head to face Blood Elf Lieutenant 0009 <gen>, offset by (0.00, 0.00, 90.00)
          • Cinematic - Send transmission to (All players) from Blood Elf Lieutenant 0010 <gen> named Guard: Play No sound and display SoldierTalkRandomString3. Modify duration: Set to 3.00 seconds and Wait
          • Animation - Reset Blood Elf Lieutenant 0010 <gen>'s body-part facing
          • Sound - Play GarithosYes4 <gen> at 100.00% volume, attached to Blood Elf Lieutenant 0009 <gen>
          • Cinematic - Send transmission to (All players) from Blood Elf Lieutenant 0009 <gen> named Guard: Play No sound and display RIght..... Modify duration: Set to 3.00 seconds and Wait
          • Wait (Random real number between 5.00 and 10.00) seconds
          • Animation - Lock Blood Elf Lieutenant 0010 <gen>'s Head to face Blood Elf Lieutenant 0009 <gen>, offset by (0.00, 0.00, 90.00)
          • Cinematic - Send transmission to (All players) from Blood Elf Lieutenant 0010 <gen> named Guard: Play No sound and display SoldierTalkRandomString4. Modify duration: Set to 3.00 seconds and Wait
          • Animation - Reset Blood Elf Lieutenant 0010 <gen>'s body-part facing
          • Sound - Play GarithosYes4 <gen> at 100.00% volume, attached to Blood Elf Lieutenant 0009 <gen>
          • Cinematic - Send transmission to (All players) from Blood Elf Lieutenant 0009 <gen> named Guard: Play No sound and display RIght..... Modify duration: Set to 3.00 seconds and Wait
          • Wait (Random real number between 5.00 and 10.00) seconds
          • Animation - Play Blood Elf Lieutenant 0009 <gen>'s stand 2 animation
          • Unit - Create 1 Disease Cloud for Neutral Passive at ((Position of Blood Elf Lieutenant 0009 <gen>) offset by (0.00, -40.00)) facing (Facing of Blood Elf Lieutenant 0009 <gen>) degrees
          • Set Fart = (Last created unit)
          • Sound - Play OgrePissed5 <gen> at 100.00% volume, attached to Blood Elf Lieutenant 0009 <gen>
          • Wait 0.75 seconds
          • Sound - Stop OgrePissed5 <gen> Immediately
          • Unit - Remove Fart from the game
          • Animation - Lock Blood Elf Lieutenant 0010 <gen>'s Head to face Blood Elf Lieutenant 0009 <gen>, offset by (0.00, 0.00, 90.00)
          • Cinematic - Send transmission to (All players) from Blood Elf Lieutenant 0010 <gen> named Guard: Play No sound and display You disgusting man!!. Modify duration: Set to 3.00 seconds and Wait
          • Animation - Reset Blood Elf Lieutenant 0010 <gen>'s body-part facing
          • Animation - Play Blood Elf Lieutenant 0009 <gen>'s stand 2 animation
          • Unit - Create 1 Disease Cloud for Neutral Passive at ((Position of Blood Elf Lieutenant 0009 <gen>) offset by (0.00, -40.00)) facing (Facing of Blood Elf Lieutenant 0009 <gen>) degrees
          • Set Fart = (Last created unit)
          • Sound - Play OgrePissed5 <gen> at 100.00% volume, attached to Blood Elf Lieutenant 0009 <gen>
          • Wait 0.75 seconds
          • Sound - Stop OgrePissed5 <gen> Immediately
          • Unit - Remove Fart from the game
          • Animation - Lock Blood Elf Lieutenant 0010 <gen>'s Head to face Blood Elf Lieutenant 0009 <gen>, offset by (0.00, 0.00, 90.00)
          • Cinematic - Send transmission to (All players) from Blood Elf Lieutenant 0010 <gen> named Guard: Play No sound and display Ok, thats it!!!. Modify duration: Set to 3.00 seconds and Don't wait
          • Wait 2.50 seconds
          • Animation - Reset Blood Elf Lieutenant 0010 <gen>'s body-part facing
          • Unit - Create 1 Disease Cloud for Neutral Passive at ((Position of Blood Elf Lieutenant 0010 <gen>) offset by (0.00, -40.00)) facing (Facing of Blood Elf Lieutenant 0010 <gen>) degrees
          • Set Fart = (Last created unit)
          • Sound - Play OgrePissed5 <gen> at 100.00% volume, attached to Blood Elf Lieutenant 0010 <gen>
          • Wait 0.75 seconds
          • Sound - Stop OgrePissed5 <gen> Immediately
          • Unit - Remove Fart from the game
        • Else - Actions
          • Skip remaining actions
 
Level 14
Joined
Apr 21, 2007
Messages
1,465
Hmm...Try doing this: Create a new trigger that has this code:

Code:
Event - Elapsed game time is 0.01
Condition - /
Action - Wait 10 seconds
      - If(All Conditions are True) then do (Action) else do (Else Action)
          If - Condition - SkipCine equal to false
          Then - Action - Run TRIGGER2
          Else - Action - Do Nothing(or put whatever you want here)

Ok so now create this TRIGGER2 and copy/paste everything from your original trigger there, but don't put an event. I believe this should work, if it doesn't I would suggest you take a look at your ESC trigger.
 
Level 12
Joined
Apr 16, 2007
Messages
262
Thanks!

The only problem is, that trigger would only check if the escape key is pressed once. I pretty much need it to check every second from the start of the game until the trigger ends.

Basically the procedure is --

the game initializes, and one trigger causes two units to hold a conversation. When the player presses escape key, a boolean becomes true, causing the rest of the cinematic to start, and the trigger making the two units to talk stop, where it is at the moment, so they dont keep talking.

Up till now they just keep talking, over anything else already hapenning.... I'm really confused...
 
Status
Not open for further replies.
Top