Staredit Newtork
Community
StarCraft
Games
Site
Favourites
Set Switch

Creator: blac_k_night
Time: Jul 11 2008, 4:34 am

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

[Avatar]
 offline contact
what the hell does it do, and how do you use it?
Top

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

[Avatar]
 offline contact
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.
Top

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

[Avatar]
 offline contact
what exactly is it used for, like in a map or soemthing?
\
Top

Post #4     Urmom(U) Jul 11 2008, 5:01 am

[Avatar]
 offline contact
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).
Top

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

[Avatar]
 offline contact
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.
Top

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

[Avatar]
Taking StarCraft Map Making to the Limit!
 offline contact
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).
Top

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

[Avatar]
 offline contact
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
This post was edited 4 times, last edit by Roy: Jul 12 2008, 7:29 pm.
Maps made by Roy
New Map Types:
Dash 2, Dash 3, Dash 4, Dash 5 Cannonball (New), Dash 6 (New)
Bounds:
WoW Bound, WoW Bound 2, NuBs Bound, When Anothing Bound (New),
The Sims Bound (New)
Top

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

[Avatar]
Taking StarCraft Map Making to the Limit!
 offline contact
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
Top
Users in this topic:


[04:30 am]
NerdyTerdy -- Once you've been around long enough it will reveal itself to you
[04:30 am]
NerdyTerdy -- It's hiding from you.
[04:24 am]
zenome -- where is the search feature on this forum
[03:43 am]
Mafia.Mayor -- damn you, you bought them before me
[03:38 am]
KrayZee -- damn you
[03:31 am]
poiuy_qwert -- wew that was a lot of negative costing items :)
You must log in to shout.

©2003-2008 Staredit Network.
Starcraft & Starcraft II are trademarks of Blizzard Entertainment.
Site Index   |   Terms of Service   |   Privacy Policy   |   Contributions