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.
[01:53 am]
Ultraviolet -- :lol:
[06:51 pm]
Vrael -- It is, and I could definitely use a company with a commitment to flexibility, quality, and customer satisfaction to provide effective solutions to dampness and humidity in my urban environment.
[06:50 pm]
NudeRaider -- Vrael
Vrael shouted: Idk, I was looking more for a dehumidifer company which maybe stands out as a beacon of relief amidst damp and unpredictable climates of bustling metropolises. Not sure Amazon qualifies
sounds like moisture control is often a pressing concern in your city
[06:50 pm]
Vrael -- Maybe here on the StarEdit Network I could look through the Forums for some Introductions to people who care about the Topics of Dehumidifiers and Carpet Cleaning?
[06:49 pm]
Vrael -- Perhaps even here I on the StarEdit Network I could look for some Introductions.
[06:48 pm]
Vrael -- On this Topic, I could definitely use some Introductions.
[06:48 pm]
Vrael -- Perhaps that utilizes cutting-edge technology and eco-friendly cleaning products?
[06:47 pm]
Vrael -- Do you know anyone with a deep understanding of the unique characteristics of your carpets, ensuring they receive the specialized care they deserve?
[06:45 pm]
NudeRaider -- Vrael
Vrael shouted: I've also recently becoming interested in Carpet Cleaning, but I'd like to find someone with a reputation for unparalleled quality and attention to detail.
beats me, but I'd make sure to pick the epitome of excellence and nothing less.
[06:41 pm]
Vrael -- It seems like I may need Introductions to multiple companies for the Topics that I care deeply about, even as early as Today, 6:03 am.
Please log in to shout.


Members Online: Ultraviolet