• 🏆 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!

[Solved] Condition: Run a trigger if another trigger is not running

Status
Not open for further replies.
Level 1
Joined
Dec 16, 2009
Messages
4
Well i'm a noob in map making so i don't know if it's possible to do this condition (without having to mess with the trigger "x"):

If "x" trigger is not running than do the action.

*
x = Name of a second trigger

This condition will work for me because i want to do a trigger that everytime a player selects a unit the units play a random sound. The thing is that if he selects the unit twice, without waiting for the played random sound end, than the two sounds will play at the same moment.
 
Level 26
Joined
Mar 19, 2008
Messages
3,140
Dont have ediotr right now around me, but i dont remember any conditions about running triggers.

I guess you should use variables: interger or boolean.

Lets go with integers: value 0 - doesnt run, 1 - runs (with booleans: False - doesn't, True - runs)
When given trigger is turned on, set variable Integer1 = 1; If its turned off set Integer1 = 0; Remeber that default value for this integer is 0.

Then in conditions:
  • Conditions
    • Integer1 equal to 1
  • Then - Actions
    • Trigger - Turn on your_trigger_2
  • Else - Actions
This is simple way of detecting turned triggers.
If you wish to choose which trigger should run depending on the one linked with Integer1 add to Else - Actions other trigger that should be turned on in this case.
 
Level 1
Joined
Dec 16, 2009
Messages
4
The problem is that doesn't wait for the sound to play for set the Integer1 = 0; So the trigger do Integer1 = 1 and than play sound and don't wait for the sound to end to set Interger1 = 1

He creates a little delay but it's not enough

I will put this and Wait Sound Lenght to see if the delay increase

Edit: i've tried with the two together and the delay is perfect now.

thanks
+rep
 
Status
Not open for further replies.
Top