PDA

View Full Version : Random Switchs and Death Counters


Twitch6000
12-19-2007, 1:18 PM
Well I have been seeing alot of topics on ranom switchs/dcs.
So I would like to solve the problem once and for all,yeah i'm bringing mapping back rofl.

Ok ok enough of the funnies.

I will show you how to randomize 1 switch and make a trigger with it,same with the death counter.

Random Switch trigger-
Conditions:Always
Actions:Randomize Switch 1

There now u have 2 possiblites :O.

Now for the switch trigger-
Conditions:Switch 1 is set,and whatever you wish(for me ill just say always)
Actions:Create a marine at location
thats one possiblty covered.
Condtions:Switch 1 is cleared and whatever you want(again for me always)
Actions:Create a medic at location.

So there we have made the outcomes of what the switches can do.There are many other things possible.

Now for the death counter trigger which is a bit easier-

Conditions:Always,(then add 1 dc)The dc ill make is add 1 custom score
Actions:preserve(sometimes for a better result if you have hypers use a 75 millasecs wait before the preserve)

Now to limit it.
Conditions:Score is 1
Actions: set score to 0
preserve

See all that simple enough right.....RIGHT!!!!!!!!!!!

Anyways here is the dc trigger-
Conditions:Score is 0,and whatever you want(about now u know what mine is :p)
Action:Create a goon at location
thats for one outcome
Conditions:score is 1 and whatever
Action:create high templar at location.

Now there are tons of other things you can do like,add preserves,change outcomes,different condition instead of always :p,and etc....

Here is a test map link.
http://www.savefile.com/files/1368126

Well that should give you enough infomation.IF not tell me why :D.

migidu
02-08-2008, 7:50 AM
Condtions:Switch 1 is cleared and whatever you want(again for me always)
Actions:Create a medic at location.

all switches are cleared at initial state. you'll have medics spawn infinitely at the beginning of the game. a solution would be to have another switch set and not randomized at the condition so that you could consider the inital state.

Conditions:Switch 1 is set,and whatever you wish(for me ill just say always)
Actions:Create a marine at location

you should clear switch 1 so it does not go infinitely.

also the formula to determine how many possibilities you have to consider when you have more than 1 switch to randomize is : 2^N where N is the number of switches to be randomized. if you exclude the combination that all the switches are cleared it would be (2^N) -1.

a problem you may get when you have hyper triggers is in a situation like this:

C:A is set; B is set
A: Display text "A is set; B is set"
A:clear A; clear B

and

C:A is cleared; B is set
A: Display text "B is set"
A: clear B

the second trigger would also be activated upon the activation of of the first trigger. because A was cleared but B was still set then it was cleared.

Twitch6000
02-08-2008, 12:45 PM
You are incorrect if you have seen my test map you would see why here ill give a new dl link since the current one is down to show you why you are wrong.

http://www.savefile.com/files/1368126