Home   Help Search Login Register  

Author Topic: Need help with script  (Read 817 times)

0 Members and 1 Guest are viewing this topic.

Oskar

  • Guest
Need help with script
« on: 17 Nov 2002, 16:17:51 »
In my mission there is a helecopter that should drop off some troops on ground, but, the helecopter is supose to be shoot, and then the group have to jump, but i dont know how to make the group eject when the helecopter is shoot, i just started ofp again and it was a while ago i last edited, i could script then but i forgot the most with the time. so if some1 can help. thanks

Offline Black_Feather

  • Former Staff
  • ****
  • I'll never forget you Daisey.
Re:Need help with script
« Reply #1 on: 24 Nov 2002, 21:03:04 »
Hi Oskar, make your self a trigger with this in the condition field

getDammage helicoptername > 0

and then execute this script from the onactivation field

_aunits = units Groupname
_i = 0
_j = count _aunits
#Here
(_aunits select _i) action ["EJECT",helicoptername]
unassignvehicle (_aunits select _i)
_i=_i+1
~1
?_j>_i:goto "Here"
"unassignvehicle _x" forEach units Groupname
exit