Staredit Network

Staredit Network -> UMS Assistance -> I Need Help
Report, edit, etc...Posted by Staredit.Net Essence on 2004-08-16 at 00:24:11
[COLOR=blue]Guys.....im new to this site....but i think im ok at mapmaking and i just dont understand Switches confused.gif ....can someone out there helpsmilie.gif me With them to me!?!?!?!?!?
They are really [COLOR=red]pissing [COLOR=blue]me off ranting.gif
Report, edit, etc...Posted by DT_Battlekruser on 2004-08-16 at 00:25:58
Switches are boolean (2-position) variables. They are Set (true) or Clear(false). Trigger conditions are true of false (set or clear) and you can toggle, randomize, set or clear switches. That is what they do.
Report, edit, etc...Posted by PsykoticNin on 2004-08-16 at 00:29:44
hmm im not the best with switches, but here goes

TRIGGER 1
condition:
-switch A is set
action:
-give player 1 200 ore
als

TRIGGER2
condition
-Always
action:
-set switch A

basicly in these two triggers, the first one describes what would happen if you set switch A but the switch is NOT activated

in trigger two the trigger is activated, and player 1 is given 200 ore

i apologize if that didn't help

Bolt_Head: Edited trigger to be read easyer.
Report, edit, etc...Posted by MapUnprotector on 2004-08-16 at 00:43:05
and switches r cleared by default wink.gif
think of a switch as in a light
when u flick the switch on(set) it turns on light(action)
when you flick the switch off(cleared) the light is off(action)
Report, edit, etc...Posted by (U)Bolt_Head on 2004-08-16 at 01:09:25
QUOTE(devilesk @ Aug 15 2004, 11:43 PM)
and switches r cleared by default wink.gif
think of a switch as in a light
when u flick the switch on(set) it turns on light(action)
when you flick the switch off(cleared) the light is off(action)

Yep and you as the electrician have the power to wire the switch however you want. If you want to turn on an outlet on or a light or if you want the light to be on when the switch is down or up.

Maybe that is trying to be to complex.

<table width="100%"><tr><td class='row4' valign='top' width="99%"><div align='left' class='row4' style='float:left;padding-top:4px;padding-bottom:4px'>
<img title='us' src='http://www.staredit.net/html/flags/us.gif' border='0'></a> <span class='postdetails'><b><a title="Show the link to this post" href="#" onclick="link_to_post(52266); return false;" style="text-decoration:underline">Posted:</a></b> Aug 16 2004, 12:09 AM CHECK OUT MY FAKE DOUBLE POST!!</span>
</div></td><td class='row4' valign='top' width="99%">
<div align='right'>
<img src='style_images/1/p_edit.gif' border='0' alt='Edit Post' /><img src='style_images/1/p_quote.gif' border='0' alt='Quote Post' /> </div></td></tr></table>
I view switches as a way to relate to past events. For an example:
-You make a trigger set a switch whenever your at a locationX
-When your at locationY you want to do something only if the player has BEEN to locationX. This what you would do for a locked door with a key.

When you pick up the key you have no physical evidence that you were to that location, and nothing for your triggers to relate to. The switch is your imaginary key, an item you have only in your mind, yet now the rest of the triggers can respond to you owning the key or not. So therefore the switch is detecting if the “pickup key” trigger has ran or not.

The more you use switches the more useful they will become. As you become better you will use them more often. Then once you improve even more you learn how not to use them. Ironic huh? (not saying there bad or anything)
Report, edit, etc...Posted by MapUnprotector on 2004-08-16 at 01:11:15
how do u not use switches?
Report, edit, etc...Posted by CheeZe on 2004-08-16 at 01:12:28
switchs are very good for what bolt said but I think a better way is death counters (except for randomizing)

i know a lot of people use swithcs for things like a function ( set a switch, this happens)
death counters save space and string and stuff so it's good smile.gif
Report, edit, etc...Posted by MapUnprotector on 2004-08-16 at 01:15:05
and you could use numbers above 0,1(set,clear) with counters right?
i used a counter in my inventory system
Report, edit, etc...Posted by Staredit.Net Essence on 2004-08-16 at 01:17:40
QUOTE
Condition: Switch one is cleared
Action: Spawn 5 Mutant Chicken Squadron at KFC


QUOTE
Condition: Player Chicken Man Controls at most 0 Fried Chicken Resturant
Action: Set Switch One


Or you could just in the first place do this...

QUOTE
Condition: Player Chicken Man Controls at least 1 Fried Chicken Resturant
Action: Spawn 5 Mutant Chicken Squadron at KFC


Much easier! closedeyes.gif
Report, edit, etc...Posted by (U)Bolt_Head on 2004-08-16 at 01:21:51
QUOTE(devilesk @ Aug 16 2004, 12:11 AM)
how do u not use switches?

Well 1 you have death counters like cheeze said. Two you realize where you don't need them at all. PsykoticNin's post is a perfect example of a trigger where the switch serves no real purpose at all. It is there and it Functions but it has no use. Of course its not always as easy to see as that.

Edit: Oh he gave another example, even better.
Report, edit, etc...Posted by MapUnprotector on 2004-08-16 at 01:24:06
o lol i wouldnt even have thought of using a switch in that occastion happy.gif
Report, edit, etc...Posted by (U)Bolt_Head on 2004-08-16 at 01:25:53
Some people use switches for everything when they first learn them. I can't even count the amount of times i go though peoples triggers and see useless switches.
Report, edit, etc...Posted by nyczdigga on 2004-08-23 at 03:17:27
condition:

a current player brings any unit to a location

Action

Setswitch 1 set=true
Preservetrigger

Condition

switch 1 set=true

action

Create 1 unit for currentplayer at anywhere
Preservetrigger


Action setting makes the switch work.
Condtion switch is the connection
Report, edit, etc...Posted by Golden-Fist on 2004-08-23 at 06:06:17
this is prolly mentioned but im gonna say it anyway biggrin.gif

Sqitchs can be used for chats a lot to. Say you a game where you have to talk to a guy to get missions. Say your first mission is.....uhh.....Kill a marine? (I dunno) so after u kill the marine you can use a switch:

Conditions:
PLayer 2 suffers deaths of 1 marine

Actions:
(You can add like all this crap like: YOU WON THE MISSION biggrin.gif D: D:)
Set Switch 1

That way when you go to talk to the guy again:

Conditions:
Player 1 brings 1 Ghost to "Talk To Dude"
Switc 1 is Set

Actions:
ahblhalbhablhabhllhabhlablhbhl

understand?
and you might wanna switch your map making skills to beginner...
Unless you know how to cloak a bunker
Report, edit, etc...Posted by Revelade on 2004-08-23 at 07:22:19
Death counts are infinitely better than switches. Use death counts on units that you are not going to need or die like powerups. Switches should only be used for RANDOMIZING variables.
Report, edit, etc...Posted by Cripple on 2004-08-23 at 09:00:11
Switches Have Endless Posibiltys Im Using About 40 Switches In My Map and About 200 Triggers Using Them
(And Im Not Done ^.^)

W00T IMA REGULAR w00t.gif w00t.gif w00t.gif uberwoot.gif uberwoot.gif uberwoot.gif
Next Page (1)