OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: BHD Mod on 15 May 2005, 08:04:24
-
Lets say i have a group named grp1. I was wondering if anyone could tell me how to make grp1 run away after they only have 6 units left. I was thinking maybe something where the script counts the units in the group and then it activates a switch trigger to another waypoint? I don't know how to do this though. Thanks!
-
A switch trigger would be okay for this. You need to give the group a name and then have the trigger fire when the number left alive is < 7. As follows:
Put this in the init field of one member of the group:
Grp1 = group this
in the condition field of the trigger put:
{alive _x} count units Grp1 < 7
-
well this is a follow up of Thobsons post.
Then sycronize the trigger to the groups very last waypoint and make sure the trigger is a switch type. That should work
-
How to make units retreat under fire? (http://www.ofpec.com/yabbse/index.php?board=8;action=display;threadid=23191)
I used in a script the following lines
#povtor
~3
_alive = ("alive _x" count units Gr1) + ("alive _x" count units Gr2) + ("alive _x" count units Gr3)
;hint format ["бойцов осталось %1",_alive]
?(_alive <= 25):goto "retreat"
goto "povtor"
-
@BHD Mod
Did you get this to work....All that happens is the trigger activates immedeatly ???. All i need is a condition read %50 group size and i've searched like crazy on here and in the scripts but to no avail :(. Please can someone help me because i can't be beaten on this..... >:(