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

Disable action in trigger with another trigger

Status
Not open for further replies.
Level 3
Joined
Jun 19, 2017
Messages
19
Hi.

I'm editing my first tower defence map on Warcraft 3 frozen.
I spent a lot of time on tutorials and youtube to understand how the editor basicly works...
(Sorry if my grammar is a bit weird, I'm not english)

The question is in the title.
I found the way to turn on/off a whole trigger with an action.
But not how to turn off one specific action in a trigger, using another trigger.
Maybe just not possible... Hope not.

The idea is to create a "automatic noob kick out system" ;-) with disable/enable function by vote.
I set 30 lives in my map.
On my multiboard are three counters: "Score", "which player lost how many lives" and "lives left".
When a player looses 25 lives by himself, I want to:
-Kick the player out.
-20 lives being set back. So far no problem...
-And the spawning of the creeps for the kicked player has to stop.

Any ideas??

If not possible, maybe I could set a "creation of a very powerful tower" at the spawning point of the noob when he's kicked, to kill all the coming creeps.
But this is not very smart in my opinion.

Thanks!
 

Jampion

Code Reviewer
Level 15
Joined
Mar 25, 2016
Messages
1,327
Maybe just not possible... Hope not.
I think it's not possible to turn it off, but you can put it into an if-then-else block. Your condition is a boolean variable. The action is only used, when the boolean variable is set to true. To turn off the action you can change the boolean variable to false and to turn it on change it to true.
 
Level 16
Joined
May 2, 2011
Messages
1,345
I think the best way is to make that action itself a full trigger. disable that trigger if you do not want the action to be executed.

Inside your trigger, it will be something like
  • Trigger: Run ACTION trigger
However, It would be best if someone could double check this. is it possible to run a trigger if it is turned off? if yes then thats a problem

another easy way would be to associate the action with a bolean variable. make the bolean True or false. You can then put the action inside a separate trigger with the condition that this bolean is true. You can also make the action inside your bigger trigger and but make it conditional if statement with the condition being this bolean = true
 
Level 3
Joined
Jun 19, 2017
Messages
19
Thanks for the very quick answer.
This is a great clue. I'll do that.

Besides I am wondering about something.
The person who creates the game is player 1. Player red in my map.
If player red becomes victim of my "kick out system", will it crash the game for the other players?
If yes, shall I disable it for player 1??

Thanks again!
 
Level 16
Joined
May 2, 2011
Messages
1,345
Thanks for the very quick answer.
This is a great clue. I'll do that.

Besides I am wondering about something.
The person who creates the game is player 1. Player red in my map.
If player red becomes victim of my "kick out system", will it crash the game for the other players?
If yes, shall I disable it for player 1??

Thanks again!
probably the best way is to check with dota and 3 guys playing lol

because I never actually used such system haha
 
Level 3
Joined
Jun 19, 2017
Messages
19
@map designer.

I already thought making the action be a full trigger. But this will make me change my whole organisation, and I really don't want to do that.
For a rookie like me it will take ages...
I'll do with the bolean trick. That's just perfect.
 

Jampion

Code Reviewer
Level 15
Joined
Mar 25, 2016
Messages
1,327
I think triggers that are turned off cannot be fired by their events, but still be fired by "run trigger".
 
Level 16
Joined
May 2, 2011
Messages
1,345
@map designer.

I already thought making the action be a full trigger. But this will make me change my whole organisation, and I really don't want to do that.
For a rookie like me it will take ages...
I'll do with the bolean trick. That's just perfect.
Well,

Do you realize you just copy actions just by selecting all of the wanted actions (with shift and mouse)? its not that hard to move triggers arround

I guess this will make it these "ages" in a split second :p
 
Status
Not open for further replies.
Top