Staredit Network

Staredit Network -> UMS Assistance -> Unit Removal
Report, edit, etc...Posted by yoni45 on 2005-06-30 at 22:23:48
hi, basicly i just need an idea as to how to remove all units such as overlords, observers, medics, spider mines, etc after a battle between 2 people is over and those are the only units left on the battlefield for either one of the players... the problem is all standard units could be used in these battles, of all 3 races, so i'm not sure as to how to work the triggers without running up large amounts of conditions (AND getting past the 16 condition limit, which altho i'm sure is doable, just adds further to the inefficiency of this method...)

any ideas appreciated biggrin.gif
Report, edit, etc...Posted by slayer766 on 2005-06-30 at 22:58:38
So you want all of the units to be completly removed?
Report, edit, etc...Posted by KaboomHahahein on 2005-06-30 at 23:07:47
To detect when there are no more units on the field except the overloard, observer (and detectors I presume). I don't think there is a way to do this unless you do the many conditions like you said. I was thinking of a way that when the detector is there and there is a cloaked unit, it should die when you still have the other units on the field. And if it does not die then you don't. But that system won't work out good at all.
Report, edit, etc...Posted by yoni45 on 2005-06-30 at 23:08:03
QUOTE(slayer766 @ Jun 30 2005, 08:58 PM)
So you want all of the units to be completly removed?
[right][snapback]249571[/snapback][/right]



all of the non-attacking units
so lets say we have P1 vs P2

P1 controls 2 dark templars and 4 dragoons

P2 controls 1 observer, 3 dragoons

P1 beats P2 because of more units period, even though P2 gave a tough fight using his micro skills biggrin.gif , now P2 has his observer left over after losing his 3 dragoons, the trigger would auto kill his observer because theres nothing the observer could do... this applies to overlords, medics etc...
Report, edit, etc...Posted by slayer766 on 2005-06-30 at 23:35:46
Well then just as Kaboom said you will have to have a trigger set up to remove those certain units after the battle is done, with all of those conditions.
Report, edit, etc...Posted by Tuxedo Templar on 2005-06-30 at 23:38:27
No way around it. You need to check if no attackable units are in the field by specifying each unit in the conditions.

If you run out of room for conditions, just use more triggers and add to a counter for each one that activates (use counters instead of switches so you can apply them to 'current player', allowing the trigger to be owned by multiple players). When they've all activated (the counter should equal the number of triggers that you need), remove the rest of the units in the field, and you're done.

Ez as pie.
Report, edit, etc...Posted by Sonic. on 2005-06-30 at 23:52:17
from wat u said, it reminds me of a map ive played before and if i is there is a simple solution...in the map you have a choosen amount of time (5 min, 10 min, 15 min) to build as many units as u can and build the units u desire...then after the time is up 2 people battle each other and the winner of that stays...then the other 2 battle and the winner of that battles the winner of the first battle(if there are 4 people in the game) if this is wat you are making(or something close to it) all u have to do is make sure the unit has life and make it to where he cannot be taken out of the arena (so there nothing it can do but die) if thats not what kinda map your making then im afraid theres no way of going around using a crap load of conditions that i can think of...
Report, edit, etc...Posted by yoni45 on 2005-07-01 at 01:34:03
actually, thats the exact map i'm making wink.gif

SC Tournament BW-X3... anyway i alrdy have it so the units can die by leaving the arena, but i want it so they auto die to make it easier on the players (in the case some jackass refuses to leave the arena to give everyone a hard time), i guess i'll have some no choice but to go ahead and use all those conditions... tux, what kind of counters should I use? death counters for odd units that arent normally in use? (ie heroes, since i use death counters of all standard in-game units)... also i'd need 2 counters, one for each player in the arena, correct?
Report, edit, etc...Posted by (U)Bolt_Head on 2005-07-01 at 03:40:50
What i think tux is suggesting is to do something like this.

Trigger
Conditions:
¤ Current player owns exactly 0 attacking unit 1
¤ Current player owns exactly 0 attacking unit 2
¤ Current player owns exactly 0 attacking unit 3
¤ Current player owns exactly 0 attacking unit 4
¤ Current player owns exactly 0 attacking unit 5
¤ Current player owns exactly 0 attacking unit 6
¤ Current player owns exactly 0 attacking unit 7
¤ Current player owns exactly 0 attacking unit 8
¤ Current player owns exactly 0 attacking unit 9
¤ Current player owns exactly 0 attacking unit 10
¤ Current player owns exactly 0 attacking unit 11
¤ Current player owns exactly 0 attacking unit 12
¤ Current player owns exactly 0 attacking unit 13
¤ Current player owns exactly 0 attacking unit 14
¤ Current player owns exactly 0 attacking unit 15
¤ Current player owns exactly 0 attacking unit 16
Actions:
¤ Set deaths for unused unit to add 1
¤ Preserve Trigger


Trigger
Conditions:
¤ Current player owns exactly 0 attacking unit 17
¤ Current player owns exactly 0 attacking unit 18
¤ Current player owns exactly 0 attacking unit 19
¤ Current player owns exactly 0 attacking unit 20
¤ Current player owns exactly 0 attacking unit 21
Actions:
¤ Set deaths for unused unit to add 1
¤ Preserve Trigger


And continue this pattern for all the possable units you want to include.

Then your main triggers would look something like this
Trigger
Conditions:
¤ Current player brings at least one men to feild
¤ Current player suffers at exactly 2 deaths of unused unit
Actions:
¤ Remove all men for current player at feild
¤ Preserve Trigger

The amount of deaths you use should reflect the number of triggers full of conditions you have. That one condition will represent all 21 i listed above.


At the very end you would do this
Trigger
Conditions:
¤ Always
Actions:
¤ Set deaths for current player of unused unit to 0.
¤ Preserve Trigger

This last trigger is important, it clears your deaths every round, this ensures that the counter can't get up to the desired value unless all the conditions from each trigger are true at the same time.
Report, edit, etc...Posted by Mini Moose 2707 on 2005-07-01 at 11:27:11
You might want to use TrigView on Uberena to get triggers like that. wink.gif
Next Page (1)