Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Disabling Triggers
Disabling Triggers
Jul 7 2008, 6:45 pm
By: Cheathunta  

Jul 7 2008, 6:45 pm Cheathunta Post #1



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.

Jul 7 2008, 6:48 pm CecilSunkure Post #2



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.

Jul 7 2008, 6:52 pm Cheathunta Post #3



Im a little confused. I just want to make it so that if P1 brings civiallian to location. it disables the triggers



None.

Jul 7 2008, 6:59 pm CecilSunkure Post #4



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.

Jul 7 2008, 7:04 pm The Great Yam Post #5



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.

Jul 7 2008, 7:06 pm CecilSunkure Post #6



Uhm those bb-codes aren't working :O

Someone should fix that?



None.

Jul 7 2008, 7:27 pm The Great Yam Post #7



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:
Disabling Triggers.scm
Hits: 1 Size: 39.36kb



None.

Jul 7 2008, 9:52 pm Cheathunta Post #8



It was a pretty good example.



None.

Jul 8 2008, 1:26 am Falkoner Post #9



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.

Jul 8 2008, 8:15 pm Cheathunta Post #10



Quote from name:O)Silent
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.

Jul 8 2008, 8:25 pm Ultraviolet Post #11



Quote from name:O)Silent
Uhm those bb-codes aren't working :O

Someone should fix that?

No one used BB Codes. He just put Conditions and Actions in brackets.

Quote from Cheathunter
Quote from name:O)Silent
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.




Jul 8 2008, 8:50 pm Cheathunta Post #12



Quote from name:NerdyTerdy
Quote from name:O)Silent
Uhm those bb-codes aren't working :O

Someone should fix that?

No one used BB Codes. He just put Conditions and Actions in brackets.

Quote from Cheathunter
Quote from name:O)Silent
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.





Thats what i thought



None.

Jul 8 2008, 10:54 pm Falkoner Post #13



Yeah, but it works just as well as the switch method does in disabling the trigger.



None.

Jul 9 2008, 10:42 am NudeRaider Post #14

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.




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[11:50 pm]
O)FaRTy1billion[MM] -- nice, now i have more than enough
[11:49 pm]
O)FaRTy1billion[MM] -- if i don't gamble them away first
[11:49 pm]
O)FaRTy1billion[MM] -- o, due to a donation i now have enough minerals to send you minerals
[2024-4-17. : 3:26 am]
O)FaRTy1billion[MM] -- i have to ask for minerals first tho cuz i don't have enough to send
[2024-4-17. : 1:53 am]
Vrael -- bet u'll ask for my minerals first and then just send me some lousy vespene gas instead
[2024-4-17. : 1:52 am]
Vrael -- hah do you think I was born yesterday?
[2024-4-17. : 1:08 am]
O)FaRTy1billion[MM] -- i'll trade you mineral counts
[2024-4-16. : 5:05 pm]
Vrael -- Its simple, just send all minerals to Vrael until you have 0 minerals then your account is gone
[2024-4-16. : 4:31 pm]
Zoan -- where's the option to delete my account
[2024-4-16. : 4:30 pm]
Zoan -- goodbye forever
Please log in to shout.


Members Online: Ultraviolet