HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Starship Troopers - turret problem!

12-23-2002, 07:49 PM#1
Guest
Ok, first, i am making a Starship Troopers defence map.

Each corner of the base (Whiskey Compound) has a turret.

In the beginning, turrets are neutral passive. When a unit, owned by one of the players enter the platform to the turret, it will change ownership to that player.

If the unit leaves, dies etc. The turret will turn back to neutral passive. This is done with a Count units: units in (units in region) equal to 1 (1 is the turret itself)

My problem is, whenever there's a corpse on the platform, the turret will not change ownership! (and there's ALOT of corpses there. Ever seen the movie? There's lots of bugs there too :D )

So how do i do this. The Count Units trigger was the only way i could come up with. The other solutions i tried didn't react when a unit died on the platform.
12-23-2002, 10:33 PM#2
Iceybro
Try using a seperate trigger that turns on whenever a person enters the turret.
Like this:

Event: Every 0.01 second

Condition: ((Unit in Turret) is dead = True)

Actions:
Turn off This trigger
Unit - Remove (Unit in Turret)
Run Trigger - (your trigger that detects if the unit has left) without Conditions

Just make sure to turn it on when a unit enters the turret and the Unit in Turret variable, set it to entering unit for the Trigger that triggers the Turrets use.
12-23-2002, 10:52 PM#3
dataangel
Add a condition to the unit group: boolean comparison: Unit is Alive equal to True.

Or setup a trigger to remove units right after they die (this gets rid of their corpse)
12-23-2002, 11:03 PM#4
Guest
Thanks for your responses!

I figured it out, didn't do exactly as you said, but you haven't got the triggers in front of you, so it's alittle hard to know how the situation is:


I did: Pick every unit in (region of turret) and do: If picked unit is dead then do (remove matching unit) else do nothing.