HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Anti-Kill Stealers

08-08-2002, 03:10 AM#1
Guest
I'm making a map where you challenge certain units to a fight. I would like to make it so that only one person can be in the arena(region) at a time. It is naturally assumed that there will always be people that will steal kills from other people. Once one person enters the arena is there a trigger setup that will keep others from entering the arena? Maybe something like a "move last entering unit"? Thanks.
08-08-2002, 03:22 AM#2
Guest
I'm not 100% certain, but I don't think it will be as simple as that. You'll need a var (integer) that will start at 0 and increase each time a unit enters the region. Then once the var is at 2 you have a different trigger on a unit entering the region and stop the unit. Then you move the unit out of the region. If the region is only exposed on two side it is sufficient to simply move the unit the opposite direction as the two exposed sides. This gaurentees the unit will no longer be in the region. If it is exposed on 3 or more sides you will need to check the direction the unit was facing upon entering the region. This angle can always be broken down into two and only two directions (well one direction very rarely). Then you can move the unit opposite of the two directions it was facing when it entered the region and it will no longer be in the region. I'm pretty sure this will do what you want it to.

Beav
08-08-2002, 03:27 AM#3
Guest
To add to what beav said you don't really need an integer that increments because there's a built in function for number of units in a region.
08-08-2002, 03:42 AM#4
Guest
Tru...

Beav
08-08-2002, 07:00 AM#5
Newhydra
And you don't really need to play with facings either, just have a region on each side, its not like the var is tied to one specific region or anything...
08-08-2002, 07:22 AM#6
Guest
Thanks a lot guys. That's all I needed to know. It works perfectly.