Home   Help Search Login Register  

Author Topic: Completing obj with enemy 95% clear  (Read 735 times)

0 Members and 1 Guest are viewing this topic.

Mr.BoDean

  • Guest
Completing obj with enemy 95% clear
« on: 02 Jan 2003, 13:56:44 »
Is there an easy way to condition a trigger whereby MOST of the enemy ...say 95% ...are dead ?  I seem to keep having a stray soldier screw up my "East"  Not Present condition of an objective trigger, which prevents an informational trigger from activating and leads to mission confusion.  :-\
     Thanks!   ;)

Offline KTottE

  • Former Staff
  • ****
Re:Completing obj with enemy 95% clear
« Reply #1 on: 02 Jan 2003, 14:50:02 »
Count the number of east units at the beginning of a mission, save into a variable.

Then have a trigger check for:

?(enemyUnits < 95)

then use that to end the mission.

(95 was assuming you had 100 enemy soldiers, change as appropriate)
"Life is not a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside, thoroughly used up, totally worn out, and loudly proclaiming 'WOW What a Ride!'"

Offline Ranger

  • Members
  • *
  • Hoo-ah!
Re:Completing obj with enemy 95% clear
« Reply #2 on: 02 Jan 2003, 19:07:16 »
Count the number of east units at the beginning of a mission, save into a variable.

Then have a trigger check for:

?(enemyUnits < 95)

then use that to end the mission.

(95 was assuming you had 100 enemy soldiers, change as appropriate)

I think this is a little ambiguous.  To be more clear, in the trigger's Condition field, put the following code:

Code: [Select]
count (list this) <= x
Where x is the number of remaining East soldiers that would be only 5% remaining (i.e., 95% are dead).

Thus, if you had 20 east soldiers, x would be 1 in order to check if 95% are dead.  Your code would thus be as follows:

Code: [Select]
count (list this) <= 1
The list command provides an array of every unit in the trigger's area that would activate the trigger.  Thus, this code counts how many units would activate the trigger, and if there is less than or equal to 1 (95% dead), the trigger will be activated.

Good luck!  8)
Ranger

Padiimiite

  • Guest
Re:Completing obj with enemy 95% clear
« Reply #3 on: 07 Jan 2003, 11:18:31 »
What? Isn't their more to that?

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Completing obj with enemy 95% clear
« Reply #4 on: 07 Jan 2003, 11:31:52 »
Thx mates, that really si great info for missions that often ends with yourself running around screaming for help to know where the last soldier is.

They should use that system in beachhead assault in red hammer. If think it took me 1 and a half hour to find that last soldier!

Padiimiite

  • Guest
Re:Completing obj with enemy 95% clear
« Reply #5 on: 08 Jan 2003, 01:15:14 »
ok, so how do I get this to work? How do I count the enemy units? Im guessing you use the CountEnemy command or countside or something, but I'm still lost on how this comes together. I keep doing diffrent things and Im having no luck.