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.
[06:48 pm]
Ultraviolet -- :wob:
[2024-4-21. : 1:32 pm]
Oh_Man -- I will
[2024-4-20. : 11:29 pm]
Zoan -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
You should do my Delirus map too; it's a little cocky to say but I still think it's actually just a good game lol
[2024-4-20. : 8:20 pm]
Ultraviolet -- Goons were functioning like stalkers, I think a valk was made into a banshee, all sorts of cool shit
[2024-4-20. : 8:20 pm]
Ultraviolet -- Oh wait, no I saw something else. It was more melee style, and guys were doing warpgate shit and morphing lings into banelings (Infested terran graphics)
[2024-4-20. : 8:18 pm]
Ultraviolet -- Oh_Man
Oh_Man shouted: lol SC2 in SC1: https://youtu.be/pChWu_eRQZI
oh ya I saw that when Armo posted it on Discord, pretty crazy
[2024-4-20. : 8:09 pm]
Vrael -- thats less than half of what I thought I'd need, better figure out how to open SCMDraft on windows 11
[2024-4-20. : 8:09 pm]
Vrael -- woo baby talk about a time crunch
[2024-4-20. : 8:08 pm]
Vrael -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
so that gives me approximately 27 more years to finish tenebrous before you get to it?
[2024-4-20. : 7:56 pm]
Oh_Man -- lol SC2 in SC1: https://youtu.be/pChWu_eRQZI
Please log in to shout.


Members Online: Roy, Amendo03