Set Switch
Jul 11 2008, 4:34 am
By: blac_k_night  

Jul 11 2008, 4:34 am blac_k_night Post #1



what the hell does it do, and how do you use it?



None.

Jul 11 2008, 4:38 am stickynote Post #2



Switches are exactly what they're called. They act like a light switch; set is on, cleared is off. All switches start out cleared, or off. To use one, you could use the condition, which would detect which switch is set or cleared, and then, in the action, there are four options. Cleared turns the switch off. Set turns it on. Toggle swaps it current setting, so if it was cleared, it is now set, and vice versa. Randomize randomly sets it to either set or cleared.



None.

Jul 11 2008, 4:48 am blac_k_night Post #3



what exactly is it used for, like in a map or soemthing?
\



None.

Jul 11 2008, 5:01 am Atlos Post #4



Say you only want a system enabled at a certain time. You can set the switch to turn the system on and then turn it off later by clearing it. Switches are very handy but are mostly replaced by death counts (which can do the same thing but more as well).



None.

Jul 11 2008, 5:59 am pneumatic Post #5



There's 2 nice things about switches that death counts can't do:

1. Randomize
2. Toggle

Randomization is obviously very useful in maps, and toggle is useful for cutting down the amount of triggers you have.

BTW, all of this can be found in StarEdit's help menu.



None.

Jul 11 2008, 3:47 pm Falkoner Post #6



This tutorial tells you a few ways to randomize using switches, and the other basic functions of them, they are usually only used when there is some global event that is the same for all players, that can either be on or off. Anything else is usually better when you use Death Counts, since they allow a different value for each player and can hold any number from -2147483648 to 2147483647,(usually you'll just use the positives).



None.

Jul 12 2008, 6:40 pm Roy Post #7

An artist's depiction of an Extended Unit Death

Oh, death counters can do randomization, as long as the trigger is activated by a player. Link

Quote from Roy from a long time ago
Mathematically, you can find how often you want somebody to hit a 'chance' on average. Let's take the simple game of Russian roulette. You have a revolver (6) with 1 bullet in it, and basically spin the wheel and then pull the trigger while pointing it at your own head. Thus you have a 1/6 chance of killing yourself while one of your friends upload it on youtube. If you wanted to make a trigger set for this, here is what it would look like:

Conditions:
- Always
Actions:
- Subtract 1 death for unit for player x (player should be unused comp, ex. p7)
- Preserve Trigger

Conditions:
- Player x has suffered exactly 0 deaths of unit
Actions:
- Set deaths for player x: set to 6 for unit
- Preserve Trigger

Conditions:
- User specified (Unburrowing, casting a spell, etc)
- player x has suffered exactly 1 deaths of unit
Actions:
- (Actions to kill/defeat player)

Conditions:
- User specified (Unburrowing, casting a spell, etc)
- player x has suffered at least 2 deaths of unit
- player x has suffered at most 6 deaths of unit
Actions:
- (Actions to next player's turn)
- Preserve Trigger

It actually saves a lot of triggers this way, because instead of making all of the "switch 1 set, switch 2 set, switch 3 cleared, switch 4 set..." triggers, you can use "at least 1 deaths, at most 8 deaths" for failure triggers.

And as for toggle, it's just one more trigger for death counts...

In conclusion, DEATH COUNTERS FTW

Post has been edited 4 time(s), last time on Jul 12 2008, 7:29 pm by Roy.




Jul 12 2008, 6:46 pm Falkoner Post #8



Yeah, or you can do it the way shown in the switches tutorial on my website (The Single Switch Randomization) and you can use a single switch for any binary power of possibilities :P



None.

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: Zincoshine