Home   Help Search Login Register  

Author Topic: Check if everyone died  (Read 1124 times)

0 Members and 1 Guest are viewing this topic.

Diepvriezer

  • Guest
Check if everyone died
« on: 13 Jan 2003, 19:21:37 »
How can you check in a condition if all soldiers from east are dead???
Like when there are 50 east soldiers, and 20 west soldiers, the 20 west soldiers kill all the 50 east soldiers. And then you have won

I`m not going to get every soldier a name and then put them all in a condition

maybe something like:

NOT(alive _x) forEach soldier commanderA

commanderA = name of the leader from group A

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Check if everyone died
« Reply #1 on: 13 Jan 2003, 19:39:44 »
"alive _x" count (units commanderA) == 0

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Diepvriezer

  • Guest
Re:Check if everyone died
« Reply #2 on: 13 Jan 2003, 20:10:54 »
but then I check or all the units are alive, or not???

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re:Check if everyone died
« Reply #3 on: 13 Jan 2003, 21:14:28 »
well, the easiest way is to create a huge trigger, condition "East Not Present" and put it about the area. Then when east is no longer present...ta-daa... :D

chris' suggestion also works, but you have to use AND arguments and all of the group leaders, obviously.

g'luck!

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Diepvriezer

  • Guest
Re:Check if everyone died
« Reply #4 on: 13 Jan 2003, 22:58:01 »
lol, why condition East Not Present

I just set it on Not Present, and activation East ;)

And condition on this :P

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Check if everyone died
« Reply #5 on: 14 Jan 2003, 02:14:29 »
Well, that's what Wolfrug was telling you.
East not present = activation: east - not present  ;)

But for the reason that he might have been telling this
dozens of times to others aswell now, he may have been
thinking, that you should understand this too.

My solution above belonged to your idea in your first
question. It checks, how many soldiers of that group
are still alive. And if the number of alive soldiers has
reached "0", it means that all are no more alive.

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Offline Ottie

  • Members
  • *
  • And you think this is personal
Re:Check if everyone died
« Reply #6 on: 15 Jan 2003, 09:03:42 »

The only problem with this solution is that if you have a large trigger area for example 500 X 500 and you have a not present then it is difficult to search the complete area (big area) and there are always some soldiers who hide.

Better is to use it in combination with a trigger of the type

East / West Present and in the condition field write:

count thislist == "fleeing _x" count thislist

In this way the trigger will set of if there are no more enemies in the area that have the guts to attack you, and you can consider the battle won.
If you can't beat them, buy them

Diepvriezer

  • Guest
Re:Check if everyone died
« Reply #7 on: 16 Jan 2003, 16:15:12 »
 ;D, I`m kinda stupid :P

And my english is fucked up :D

But thanks for the reactions, I know how to check it now, thanks!