Staredit Network

Staredit Network -> UMS Assistance -> Lives in Bounds?
Report, edit, etc...Posted by Shadow on 2005-01-21 at 17:55:56
When I set the lives up i know how to set the trigger up but i don't know how to use switches in the trigger!

I.E.


Trigger
Description:
Lives
Players:
¤ Force 1
Conditions:
¤ Command 0 Zergling
Actions:
¤ Create 1 Zergling at Trap 1
¤ Subtract 1 mineral
¤ Preserve Trigger


But if the player dies at the second trap i dont understand how to get the zergling to be creates at the next Trap...

Do i use switches with it?

Thanks for the help!
Report, edit, etc...Posted by MapUnprotector on 2005-01-21 at 17:58:00
QUOTE(Shadow @ Jan 21 2005, 06:55 PM)
When I set the lives  up i know how to set the trigger up but i don't know how to use switches in the  trigger!

I.E.





Trigger
Description:
Lives
Players:
¤ Force 1
Conditions:
¤ Command 0 Zergling
Actions:
¤ Create 1 Zergling at Trap 1
¤ Subtract 1 mineral
¤ Preserve Trigger


But if the player dies at the second trap i dont understand how to get the zergling to be creates at the next Trap...

Do i use switches with it?

Thanks for the help!
[right][snapback]129498[/snapback][/right]


Use a death counter everytime you complete a level, like after currentplayer completes level 1 add 1 death count and keep adding as they beat levels

Then when they die check how many death counts they have and that will tell you what level they are at, so just respawn there.
Report, edit, etc...Posted by Urmom(U) on 2005-01-21 at 17:59:45
ok for this you jsut need to use switches in the conditions.


null
Trigger
Conditions:
¤ current player commands exactly 0 zerglings
¤ trap1 is set
Actions:
¤ subtract 1 mineral from current player
¤ create 1 zergling for current player at trap1
¤ preserve trigger


then have another for trap 2

null
Trigger
Conditions:
¤ current player commands exactly 0 zergling
¤ trap2 is set
Actions:
¤ subtract 1 mineral for current player
¤ create 1 zergling at trap 2
¤ preserve trigger


you may also want to add the accumulates into the conditions to see if they have any lives.

<edit> you can use a death counter like devilisk said but at beginner level, switches are easier.
<double edit> lmao we just all posted a minutes apart from the person in front. also devilisk you dont need to quote the person before you if your the first replier
Report, edit, etc...Posted by LegacyWeapon on 2005-01-21 at 18:00:18
Use either switches or death counters.
For the end of one bound obstacle and the beginning of another, you have that "rest" area correct? You should have a location for that "rest" location in order to detect that the player has beaten a certain obstacle in order to continue on. Make another trigger that at the end of each obstacle, center the location 'spawn' on a non-existant unit at "rest" area. This will cause the location 'spawn' to move to the center of the "rest" area so you will need one spawning trigger.
The spawning trigger would be like this:
Trigger
Conditions:
¤ Command 0 Zergling.
¤ Accumulates at least 1 mineral.
Actions:
¤ Create 1 Zergling at 'spawn'
¤ Subtract 1 mineral.
¤ Preserve trigger.
Report, edit, etc...Posted by MapUnprotector on 2005-01-21 at 18:01:32
QUOTE(LegacyWeapon @ Jan 21 2005, 07:00 PM)
Use either switches or death counters.
For the end of one bound obstacle and the beginning of another, you have that "rest" area correct? You should have a location for that "rest" location in order to detect that the player has beaten a certain obstacle in order to continue on. Make another trigger that at the end of each obstacle, center the location 'spawn' on a non-existant unit at "rest" area. This will cause the location 'spawn' to move to the center of the "rest" area so you will need one spawning trigger.
The spawning trigger would be like this:


Trigger
Conditions:
¤ Command 0 Zergling.
¤ Accumulates at least 1 mineral.
Actions:
¤ Create 1 Zergling at 'spawn'
¤ Subtract 1 mineral.
¤ Preserve trigger.

[right][snapback]129504[/snapback][/right]


Bah legacy rapes me with his triggering -.- stop being so fancy and saving locations -.-
Report, edit, etc...Posted by KaboomHahahein on 2005-01-21 at 18:15:44
There is another way of doing it.


Trigger
Description:
Location thing
Players:
¤ Force 1
Conditions:
¤ Bring(Force1, AtLeast, 1, Obstacle passer, Start 2);
Actions:
¤ SetSwitch(Switch 1, Clear);
¤ SetSwitch(Switch 2, Set);
¤ MoveLocation(Start 1, Floor Gun Trap, P8, Start 2);


[justify]So you have one overal spawning location which is start 1 in this. So everytime you pass and obstacle you move the location onto another location so you will spawn at the same location but the location is actually in another place. And you don't really need the units. You can just make up a unit, the trigger will still work aslong as you have another location on the "imaginary" unit.[/justify]
Report, edit, etc...Posted by Shadow on 2005-01-21 at 18:19:01
Im kind of confused by all of your replies except for urmom


BTW: I like your name ^ ^ Urmom ahahaha

OK back to being serious,

The switches being set with my traps, wouldnt that interfere with the trap

I.E.


Trigger
Description:
Lives//Trap 2
Conditions:
¤ Bring(Force1, AtLeast, 1, AnyUnit, Trap 2);
Actions:
¤ SetSwitch(Switch 2 Set);
¤ SetSwitch(Switch 1, Clear);


Then with your lives trigger

wouldnt the "SetSwitch 2" Interfere with the previous switch?


Report, edit, etc...Posted by Urmom(U) on 2005-01-21 at 18:23:02
to answer your question its no. the switches in my triggers wouldnt affect your because its in the conditions. the switch2 was in the actions then it could be a problem. but from what i see, your doing your triggering correctly and it should work fine.

<edit> you may want to clear switch 1 before setting switch2 also because now that i look at it, that could perhaps cause a problem
i like my name Urmom too biggrin.gif
Report, edit, etc...Posted by Shadow on 2005-01-21 at 18:29:37
Wow Thanks Kaboom that was very helpful and thanks for everyone else that replied i liked the way he explained it smile.gif
Report, edit, etc...Posted by LegacyWeapon on 2005-01-21 at 18:57:42
QUOTE(KaboomHahahein @ Jan 21 2005, 06:15 PM)
There is another way of doing it.




Trigger
Description:
Location thing
Players:
¤ Force 1
Conditions:
¤ Bring(Force1, AtLeast, 1, Obstacle passer, Start 2);
Actions:
¤ SetSwitch(Switch 1, Clear);
¤ SetSwitch(Switch 2, Set);
¤ MoveLocation(Start 1, Floor Gun Trap, P8, Start 2);


So you have one overal spawning location which is start 1 in this. So everytime you pass and obstacle you move the location onto another location so you will spawn at the same location but the location is actually in another place. And you don't really need the units. You can just make up a unit, the trigger will still work aslong as you have another location on the "imaginary" unit.
[right][snapback]129514[/snapback][/right]


That's how I explained it...
Report, edit, etc...Posted by KaboomHahahein on 2005-01-21 at 19:15:33
Sorry if I copied you. I did not bother to look at your text. I just saw that your triggers were different so I did it my way. Oh well, does not matter as long as he knows how to do it.
Report, edit, etc...Posted by MapUnprotector on 2005-01-21 at 20:08:46
Death counters and moving spawn location every time you complete the level, is probably the best way
Report, edit, etc...Posted by Shadow on 2005-01-21 at 20:33:22
OOPS... Sorry LW im a little slow then i read his and didnt look back to see if yours was the same! lol next time i should be a little more observant!!
Next Page (1)