Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: what does the Switch condition mean?
what does the Switch condition mean?
This topic is locked. You can no longer write replies here.
Jul 25 2008, 12:21 am
By: frank  

Jul 25 2008, 12:21 am frank Post #1



__ is set?



None.

Jul 25 2008, 12:51 am rockz Post #2

ᴄʜᴇᴇsᴇ ɪᴛ!

Switches are either Set or Cleared.

The condition "switch01 is set" will only be fulfilled if you have a trigger with an action that says "Set switch01". They're binary variables which take up a string, and have only one advantage over death counts: randomization. If you need to know more, you need to elaborate your question more.



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Jul 25 2008, 1:07 am frank Post #3



Quote from rockz
Switches are either Set or Cleared.
The condition "switch01 is set" will only be fulfilled if you have a trigger with an action that says "Set switch01". They're binary variables which take up a string, and have only one advantage over death counts: randomization. If you need to know more, you need to elaborate your question more.
Can you explain it in context of a Special Forces map.
Also, what is randomization?



None.

Jul 25 2008, 1:18 am Brontobyte Post #4



Quote from frank
Quote from rockz
Switches are either Set or Cleared.
The condition "switch01 is set" will only be fulfilled if you have a trigger with an action that says "Set switch01". They're binary variables which take up a string, and have only one advantage over death counts: randomization. If you need to know more, you need to elaborate your question more.
Can you explain it in context of a Special Forces map.
Also, what is randomization?

Randomization is simply randomly (50/50) selecting the switch to either be "Set" or "Cleared" This is always random. For 1 switch the chances are 50/50.
For 2 switches the chances are 25% (for each outcome
...

The more switches randomized, the more possible outcomes.

Also, "Set" = "Set" in the text editor and "Cleared" = "Not Set" in the text editor, just for some clarification. :P



None.

Jul 25 2008, 1:31 am frank Post #5



ok here's how i understand it:

a trigger sets (or unsets) a unique switch with the action "Set Switch"; and a second trigger, which has to be after the former trigger in order for it to work (or not work), is "triggered" when the condition Switch, which refers to the same unique switch as the former trigger, is met.

This is some nice boolean logic. And, in the context of a Special Forces map, it prevents the game from ending in defeat at the beginning by having the "Create Special Forces Recruit (civilian)" trigger sets a switch, which the "When current player has at most 0 units, end in defeat" trigger needs to be implemented (and not until then!).

Thanks again... now for some fun!



None.

Jul 25 2008, 1:36 am frank Post #6



Quote from Brontobyte
Randomization is simply randomly (50/50) selecting the switch to either be "Set" or "Cleared" This is always random. For 1 switch the chances are 50/50.
For 2 switches the chances are 25% (for each outcome
Can you explain randomization in the context of a SF map, please? Like what conditions and/or actions are used for Randomization?

Is this for the randomization of unit-spawns?



None.

Jul 25 2008, 1:40 am rockz Post #7

ᴄʜᴇᴇsᴇ ɪᴛ!

Randomization randomizes the switch to on or off. It's impossible to tell you in the context of a SF map, but yes, you could use it to randomize the guys that spawn. Not many people use it. Check the wiki for more.
http://www.staredit.net/wiki/Randomization
http://www.staredit.net/wiki/Switch
http://www.staredit.net/wiki/Death_Counters



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Jul 25 2008, 6:07 am Falkoner Post #8



Often switches are used simply to remember that something was triggered, like, in your SF map, chances are, when the player killed a certain unit, or building, a switch was set, and then the map has a trigger that creates units at that building, only when that switch is set.

Switches are generally used for Global events that are the same for all players and can only have 2 values, on or off, if you want to have a variable that's different for every player, you usually want to use Death Counts instead.



None.

Jul 25 2008, 9:54 am frank Post #9



thanks for the links... if i knew there was a wiki on the site i would have went there first!

i really like the idea of randomization... it has the potential to make every game you play on a certain map pretty much unique



None.

Jul 25 2008, 1:20 pm Clokr_ Post #10



Quote from frank
thanks for the links... if i knew there was a wiki on the site i would have went there first!

i really like the idea of randomization... it has the potential to make every game you play on a certain map pretty much unique

It says so here...



?????

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[11:45 pm]
ClansAreForGays -- Anyone wanna played Skewed StarCraft?
[2026-4-14. : 12:07 am]
Vrael -- NudeRaider
NudeRaider shouted: Vrael ranting still is though
you're a gentleman and a scholar, thank you
[2026-4-13. : 10:07 pm]
NudeRaider -- ya why phone people when you can just write letters
[2026-4-13. : 9:37 pm]
IskatuMesk -- I have never and will never own a phone
[2026-4-13. : 9:15 pm]
NudeRaider -- Vrael ranting still is though
[2026-4-13. : 9:14 pm]
ClansAreForGays -- anticapitalism isnt edgy anymore
[2026-4-13. : 3:31 pm]
Vrael -- it only costs 50% of my post-tax salary for life and in return I get to also become a drone whose sole purpose is CAPITALISM
[2026-4-13. : 3:30 pm]
Vrael -- pssht, you're still using a phone? I just record 100% of my life using my ElonBrainChip
[2026-4-13. : 2:13 pm]
NudeRaider -- bro I don't go anywhere without my phone to record anything significant
[2026-4-13. : 1:28 pm]
Vrael -- Zoan
Zoan shouted: not if u wer there
id say even if you were there its tricky, human memory can be very faulty
Please log in to shout.


Members Online: Ojan