Staredit Network

Staredit Network -> UMS Assistance -> [SOLVED] Switches
Report, edit, etc...Posted by HellHound on 2007-02-01 at 23:33:29
I am unsure on how to use switches, and i was looking for an example of how to use them and what they are used for, and is there any other way i can use something else other than the switches, like death counter?
Report, edit, etc...Posted by DT_Battlekruser on 2007-02-01 at 23:49:02
Switches are exactly what they sound like. They can be used in trigger conditions to check if they are an one of two states: on (set) or off (cleared).

In the actions portion of a trigger, you can set, clear, toggle (switch), or randomize a switch. They're used, quite simply, as switches.

Death counters of unused units work as variables. You can check their value in a condition, and add, subtract, or set them to a value in an action.
Report, edit, etc...Posted by joker2kill on 2007-02-02 at 00:03:40
Think of it as a light Switch biggrin.gif. When you flick the light switch up (Set) it turns that light on.
When you flip the switch down (Clear) It turns off the light.
We'll that is how I remember it.
Report, edit, etc...Posted by Falkoner on 2007-02-02 at 18:22:47
Switches are a very simple way to set conditions using triggers, you can also use death counts as switches by using 0 as cleared, and 1 as set, switches are the only way to ACTUALLY randomize, since death counts can be timed, randomizing a switch just makes it randomely set or cleared.
Report, edit, etc...Posted by HellHound on 2007-02-03 at 02:46:54
Is it possible you can give me an example?

ADDITION:
QUOTE(Falkoner @ Feb 2 2007, 07:22 PM)
Switches are a very simple way to set conditions using triggers, you can also use death counts as switches by using 0 as cleared, and 1 as set, switches are the only way to ACTUALLY randomize, since death counts can be timed, randomizing a switch just makes it randomely set or cleared.
[right][snapback]622297[/snapback][/right]


I am still very... very confused... lol... Please help me more! blushing.gif
Report, edit, etc...Posted by Mr.Chicken on 2007-02-03 at 04:52:06
The way to do it is make test maps and try different methods.

try this...

make a new map (any type) create a beacon and 2 locations and a unit, 1 beside the beacon and 1 on the beacon, next triggers

Conditions
bring to location (this is the beacon location)
Actions
set switch 1

Conditions
switch 1 is set
Actions
create 1 (unit) at location 2 (this is the location beside the beacon)
remove unit at location (remove at location 1)
clear switch 1

What this will do is create 1 unit at "Location 2" when you bring your unit to "Location 1"

Switchs have many use's they are ESSENTIAL if your looking into *defence* type maps or bounds, although there are other ways. you can also use multiple switchs in creating a random scenario or defence map.
Report, edit, etc...Posted by Kyuubi. on 2007-02-03 at 04:55:39
QUOTE(HellHound @ Feb 2 2007, 11:46 PM)
Is it possible you can give me an example?

ADDITION:
I am still very... very confused... lol... Please help me more!  blushing.gif
[right][snapback]622558[/snapback][/right]

all switches starts out as a "clear" state.

here's an example on how a trigger can work with switches.

Trigger 1
------------
Condition:
-Always
Actions:
-"Set" Switch 1

Trigger 2
------------
Condition:
-Switch 1 is set
Actions:
-Create one marine

once the conditions are fullfilled in trigger 2, the actions will commence. it'll create a marine. that's just a basic example. you can do more stuff with it.

switches are mainly use for randomizing because they can bring an random outcomes based on a chance. randomizing a switch will set it to either clear or set when the trigger is fired, you won't know if it's going to be set or clear.
Report, edit, etc...Posted by CheatEnabled on 2007-02-03 at 07:22:28
Try doing as Mr. Chicken told you, and then try to delete the Switch in the first trigger. You will now see that the trigger won't work.

Other ways to store variables can be death counters, units at specific locations, leaderboeard points and resources. Try experimenting with the different variables, and see what suits you /your map best. Combining different variables also works, but that way is generally just used in advanced maps.
Report, edit, etc...Posted by HellHound on 2007-02-03 at 17:48:37
QUOTE(Mr.Chicken @ Feb 3 2007, 05:52 AM)
The way to do it is make test maps and try different methods.

try this...

make a new map (any type) create a beacon and 2 locations and a unit, 1 beside the beacon and 1 on the beacon, next triggers

Conditions
bring to location (this is the beacon location)
Actions
set switch 1

Conditions
switch 1 is set
Actions
create 1 (unit) at location 2 (this is the location beside the beacon)
remove unit at location (remove at location 1)
clear switch 1

What this will do is create 1 unit at "Location 2" when you bring your unit to "Location 1"

Switchs have many use's they are ESSENTIAL if your looking into *defence* type maps or bounds, although there are other ways. you can also use multiple switchs in creating a random scenario or defence map.
[right][snapback]622623[/snapback][/right]


Thank You SO much... I totally understand it now... Thanks Again!
Next Page (1)