HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

How do you kill a number of units in a region?

05-28-2004, 02:13 AM#1
Aerandir
I want to make a trigger, that when a unit is selected, it kills 6 units in a region and adds a number to an integer.
Sacrifice 6 specific units in an area to get 3000 points sort of thing.
05-28-2004, 02:18 AM#2
Arohk
everything that has to do whit counting you should find at integer-

integer-count units in region = 6
05-28-2004, 02:31 AM#3
Aerandir
Yeah I know that part, but how do I kill a number of units in a region?
05-28-2004, 05:15 AM#4
Mr.Safety
That depends on how you want to do it. If you just want to kill 6 guys in a region then all you need is a loop. Just loop from 1 to 6, kill a dude in region X (x being whatever region you want the unit to be in).
05-28-2004, 07:47 AM#5
Aerandir
The thing is, there doesn't seem to be a Kill unit in region...
05-28-2004, 08:36 AM#6
BladeKiller
I got the answer:


Unitgroup - Pick every unit in (Random 6 units from (Units in (<Your Region>))) and do (Unit - Kill (Picked unit))

Its in Unitgroup: Pick every unit in
and
Random N Units from Unitgroup
05-28-2004, 06:59 PM#7
Aerandir
Okay, I almost got it, but it has to be a specific unit. Right now, it destroys any unit in that region. I want it to destroy 6 wolves. These wolves are generated every 45 seconds so i can't exactly select them.
05-29-2004, 01:54 AM#8
genki-dama
Quote:
Originally Posted by Aerandir
Okay, I almost got it, but it has to be a specific unit. Right now, it destroys any unit in that region. I want it to destroy 6 wolves. These wolves are generated every 45 seconds so i can't exactly select them.

EVENT:
Whatever you want
ACTION:
Unit Group - Pick every unit in (Random 6 units from (Units in (Your Region) matching ((Unit-type of (Matching unit)) Equal to Wolves))) and do (Unit - Kill (Picked unit))

This is a Pick every unit in unit grup action, using the all units matching condition function.

goodluck ^_^
05-29-2004, 04:05 AM#9
Aerandir
Ohh, so its MATCHING! I'm just used to the stuff being there, like StarCraft Campaign Editor... I really love the WorldEditor...endless possibilities...
I hope this works!

P.S. Like my avatar?