Staredit Network

Staredit Network -> UMS Assistance -> Switches help
Report, edit, etc...Posted by Resguy on 2007-02-03 at 23:18:59
I've looked at the tutorial for Switches and a place where TCTBT sended me. I don't understand anything.
Report, edit, etc...Posted by Doodan on 2007-02-03 at 23:30:43
They're sorta like On/Off levers that have yet to be assigned a use by you. Suppose you want an enemy to appear in a certain place, but only AFTER the player has completed a certain objective. In that case, you'd use a switch (and I DO recommend renaming them. For this example we'll call it ENEMY SPAWN) to make sure that the enemy only appears after the other objective is finished. You decide that the trigger for the enemy spawn will only work if the switch is "Set". You make a trigger that has an action of "Set ENEMY SPAWN" once they've completed that first objective. Up until the objective was completed, the enemy wouldn't spawn at the location because the switch was set to "Clear". But now that its "Set", the enemy will spawn.

I hope that makes sense. It was a bit of a hurdle for me, too.
Report, edit, etc...Posted by HellHound on 2007-02-04 at 02:50:56
QUOTE(Resguy @ Feb 4 2007, 12:18 AM)
I've looked at the tutorial for Switches and a place where TCTBT sended me. I don't understand anything.
[right][snapback]622993[/snapback][/right]


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 fritfrat(U) on 2007-02-04 at 21:22:02
I'll just quote myself.

QUOTE
The other post:
http://www.staredit.net/index.php?showtopic=38586

Clan Unknown wiki article on it:
http://www.clanunknown.net/SetSwitch?v=gxt

Tutorial:
http://www.staredit.net/index.php?tutorial=116

If you have any aspects you're still not sure about, just ask.
Report, edit, etc...Posted by T-a-r-g-e-t on 2007-02-05 at 09:02:40
some editors use switches. some use death counters.

use switches when you want 1 event to happen from various conditional statements. switches can save you much triggering. for instance, if there are 50 ways of doing the same thing; lets suggest every time you bring a unit to locations 1-50, it displays a text message and creates a unit. instead of triggering those actions 50 times, you just set a specified switch each time. then, you have 1 trigger which executes all the actions and then turns the switch off again.

CONDITIONAL TRIGGERS

Condition
If any player brings at least 1 unit to location 1
Action
Set switch 1
Preserve trigger

Condition
If any player brings at least 1 unit to location 2
Action
Set switch 1
Preserve trigger

etc, do this however many times you like

RESPONSE TRIGGERS

Condition
If Switch 1 is set
Action
Clear switch 1
Display text message
Create unit
Preserve trigger

that was just an example of using switches. there are other uses of switches, like randomizing and structuring complex code, but the more you play with them, the more you will get use to them. they are there just to help your system decide what to happen next.
Next Page (1)