OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Phantom on 08 Sep 2002, 08:03:21
-
i've got my guy's getting into a chopper that is on the ground to start with.
if i give the chopper a load waypoint (either on top of the chopper or near it) and my guy's a get in waypoint, the chopper will go up in the air then come back down for them, is there any way of keeping the chopper on the ground until my guy's are in. i was thinking u could just stop them from turning the engine on, and then have it go back on somehow once they're all in, possibly with a trigger. but i know jack all about how to do it, so i've come to the ever faithful OFPEC forum for help.
so please HELP!
Phantom
-
Old classic chopper prob this one. The classic solution is thus:
remove all their fuel until the men are all inside!
First, name the chopper (chop1) then the group (grp1; you name groups by putting grpName=group this into the init field of any group memeber). Now write this into the choppers init field:
this setFuel 0.0
then create a trigger, a/b:0 type: None.
in the Condition field write:
"_x in Chop1" count Units grp1 == "alive _x" count Units grp1
then in the On Activation field write:
Chop1 setFuel 1.0
Now, the condition field there waits until all men in group grp1 are inside the vehicle chop1, and then gives chop1 full fuel (thus enabling it to lift off). No LOAD waypoints needed for the chopper, just a normal move straight off. As to the actual meaning...well, simplified, it compares the number of people inside the chopper to the number of people alive in the group: thus, if any of the group's members get killed before getting into the chopper, the chopper won't wait for them forever ;D
Good luck! :thumbsup:
Wolfrug out.
-
cheers mate, thanks for the help
-
it worked ? :) "solve" da topic PLZ ;D
:cheers:
LCD OUT