OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Diepvriezer 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
-
"alive _x" count (units commanderA) == 0
~S~ CD
-
but then I check or all the units are alive, or not???
-
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.
-
lol, why condition East Not Present
I just set it on Not Present, and activation East ;)
And condition on this :P
-
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
-
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.
-
;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!