I heard that you can use switches to disable triggers. Could it be like this?
I have a load of triggers. Should i Put, set Switch one?
Than: Player 1 bring civiallian to Skjp intro, Clear switch one.
Like this?
None.
Well if you want a trigger to be disabled by a switch, have in your trigger condition:
-Switch 1 is cleared
Then the rest of your trigger remains the same.
Then when you want this trigger to be disabled, in some other trigger your need to set Switch 1.
None.
Im a little confused. I just want to make it so that if P1 brings civiallian to location. it disables the triggers
None.
Oh well then in the trigger you want disabled, put in the condition:
p1 brings at most 0 units to 'civlocation'
Then when the civ is in that location the trigger wont fire.
None.
This is the format for the triggers you want to be disabled, you just have to add the switch as an additional condition (having it set as cleared is easier if you want it activated by default). It's important to remember that switches are automatically set as cleared, but you can still use them when cleared. The other conditions and trigger actions are whatever they need to be.
Example Trigger 1
Player 1
[CONDITIONS]
Switch 1 is Cleared
Example Condition
[ACTIONS]
Do "Example action" At "Example Location"
Then, this is the trigger that disables one like Example Trigger 1
Disable Trigger
Player 1
[CONDITIONS]
Player 1 brings atleast 1 "Example Unit" to "Disable Triggers"
[ACTIONS]
Set "Switch 1"
What 0)Silent said will only disable the trigger(s) while the unit is in that location, which is most likely not what you want.
None.
Uhm those bb-codes aren't working
Someone should fix that?
None.
I've made an example map for you. Test the beacons that place and remove the SCVs before going to the one that sets switch 1. Then try the other beacons.
Attachments:
None.
It was a pretty good example.
None.
The switch REALLY isn't necessary, Silent's second response covers all you really need. Okay, Cheathunter, I don't think you get what switches are, read the first part and last section of
this tutorial to get a basic idea of switches, all they are are binary variables(only 2 possible values) to make triggers not run, all you need to do is add a condition that may or may not be true to the trigger, you don't need to use switches.
None.
Oh well then in the trigger you want disabled, put in the condition:
p1 brings at most 0 units to 'civlocation'
Then when the civ is in that location the trigger wont fire.
I actually tried this, but it doesent work. Does it not work if the trigger starts as soon as the game starts?
None.
Don't stop till you get enough
Uhm those bb-codes aren't working
Someone should fix that?
No one used BB Codes. He just put Conditions and Actions in brackets.Oh well then in the trigger you want disabled, put in the condition:
p1 brings at most 0 units to 'civlocation'
Then when the civ is in that location the trigger wont fire.
I actually tried this, but it doesent work. Does it not work if the trigger starts as soon as the game starts?
You can't stop a trigger halfway through. You have to stop it before it starts lol.
Yeah, but it works just as well as the switch method does in disabling the trigger.
None.
We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch
If you need to stop a trigger in the middle then you must split it and connect them somehow (e.g. with a switch).
For example you add an action that sets switch 1 in the first part of the trigger.
Then you make a "check-trigger" that checks if the second part should run. If not, clear the switch in this trigger.
And lastly the 2nd part of the trigger which has switch is set as the only condition.
Order is obviously important here.