what the hell does it do, and how do you use it?
None.
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.
what exactly is it used for, like in a map or soemthing?
\
None.
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.
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.
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.
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.
LinkQuote 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.
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
None.