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.
[10:09 pm]
Ultraviolet -- let's fucking go on a madmen rage bruh
[10:01 pm]
Vrael -- Alright fucks its time for cake and violence
[2024-5-07. : 7:47 pm]
Ultraviolet -- Yeah, I suppose there's something to that
[2024-5-06. : 5:02 am]
Oh_Man -- whereas just "press X to get 50 health back" is pretty mindless
[2024-5-06. : 5:02 am]
Oh_Man -- because it adds anotherr level of player decision-making where u dont wanna walk too far away from the medic or u lose healing value
[2024-5-06. : 5:01 am]
Oh_Man -- initially I thought it was weird why is he still using the basic pre-EUD medic healing system, but it's actually genius
[2024-5-06. : 3:04 am]
Ultraviolet -- Vrael
Vrael shouted: I almost had a heart attack just thinking about calculating all the offsets it would take to do that kind of stuff
With the modern EUD editors, I don't think they're calculating nearly as many offsets as you might imagine. Still some fancy ass work that I'm sure took a ton of effort
[2024-5-06. : 12:51 am]
Oh_Man -- definitely EUD
[2024-5-05. : 9:35 pm]
Vrael -- I almost had a heart attack just thinking about calculating all the offsets it would take to do that kind of stuff
[2024-5-05. : 9:35 pm]
Vrael -- that is insane
Please log in to shout.


Members Online: DiearAnother