Home   Help Search Login Register  

Author Topic: make units flee  (Read 506 times)

0 Members and 1 Guest are viewing this topic.

AE7THSF

  • Guest
make units flee
« on: 27 Dec 2002, 05:45:57 »
when there the last unit alive in squad
ty in advanced ;D

The_Milky_Bar_Kid

  • Guest
Re:make units flee
« Reply #1 on: 27 Dec 2002, 20:56:31 »
I'd do it like this:

MISSION EDITOR:
-Add a group and in the Officer's name field type "GroupA"
-Add an Game Logic where you want the to flee to, in it's name field type "FleePoint"

SCRIPT:

#start
_grpcount = count units GroupA
? (_grpcount = 1): goto "move"
~1
goto "start"

#move
_pos = getpos FleePoint select 0
GroupA move  _pos
exit


Then activate the script in the mission editor.

Hope that helps.

P.S: I'm not sure about  the "_grpcount = count units GroupA" line, if it doesn't work sorry.
« Last Edit: 27 Dec 2002, 21:11:44 by The_Milky_Bar_Kid »