Home   Help Search Login Register  

Author Topic: Simple Retreat script  (Read 536 times)

0 Members and 1 Guest are viewing this topic.

BHD Mod

  • Guest
Simple Retreat script
« 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!

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Simple Retreat script
« Reply #1 on: 15 May 2005, 08:09:07 »
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

Offline 456820

  • Contributing Member
  • **
Re:Simple Retreat script
« Reply #2 on: 15 May 2005, 10:48:21 »
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

bdfy1

  • Guest
Re:Simple Retreat script
« Reply #3 on: 15 May 2005, 12:23:18 »
How to make units retreat under fire?
I used in a script the following lines
Quote
#povtor
~3
_alive = ("alive _x" count units Gr1) + ("alive _x"  count units Gr2) + ("alive _x" count units Gr3)  
;hint format ["&#1073;&#1086;&#1081;&#1094;&#1086;&#1074; &#1086;&#1089;&#1090;&#1072;&#1083;&#1086;&#1089;&#1100; %1",_alive]
?(_alive <= 25):goto "retreat"
goto "povtor"

Offline mr reality

  • Members
  • *
  • insert sharp object
Re:Simple Retreat script
« Reply #4 on: 18 May 2005, 20:45:19 »
@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..... >:(  
"I'd like to do more than dance with her"