OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Flakker on 20 Apr 2003, 20:47:26
-
I have a chinook with a squead inside, the player controlling the squad (standard infantry). The squead is initialized into the chooper with <"_x moveincargo Chinook1" forEach units group this> . I have a TRANSPORT_UNLOAD synchronised with the an UNLOAD for the squad.
Im trying to get the squad forcefull disembarked, then the chopper to go on along its waypoints. However as soon as the player is forcefully disembarked, I have to give orders for the rest of the squad to do so(which I wish to avoid). As they're getting out the helicopter takes off and the men jump to their deaths. Can anyone help please?
-
:P You need to get the chopper to fly higher, guys will die if the chopper is too low. Control AI chopper altitude with the FlyInHeight script command. ::) This command will only work if the chopper is moving (not hovering) while in-between waypoints (not in-transition). It of sorts for-shadows a human (player) pilot.
-
Thanks for the advice but you haven't understood what Im asking. I dont want them to jump out! I want them to walk out when the chopper is on the deck. Furthermore, I want it to happen automatically so the player need not order the squad to 'diembark'.
-
if you unAssign them that might help.
If all else fails on the chopper just put a 10 second delay (or whatever) on the waypoint.
I don't use choppers much so hopefully somebody who really knows the answer will happen along soon .....
-
Hello
Well I have tried something but I havent been succesfull yet
First of all you dont need the Unload waypoint for the men, you can just give them the waypoint for them to goto when out of the helo.
If you put the following sentence in the Helo's TRANSPORT UNLOAD waypoint then it will just sit there till the men are out so no more dead guys when the helo takes off.
goes into TRANSPORT UNLOAD wp's "on activation" box:
"unassignvehicle _x" foreach units groupname
for this you better initialize the group with:
groupname=group this; "_x movincargo heloname" foreach units groupname
as the "foreach units group this" thing in your officers init line does not apply to the group when "group this" is put into the helo's WP, you need a specified name then.
I tried an action like this following the unassign stuff in the helo's WP,
gto="getout"; "unassignvehicle _x" foreach units groupname; "_x action [gto,heloname]" foreach units groupname
This doesnt work althought when I had used it with the Eject command it did work o.k. and this way all the AI in your group is ejected automatically. I might be using the wrong command (however GETOUT seems pretty o.k. to me) .....please someone correct me if I am wrong.
-
Again thanks for the assistance, but no joy. I've tried a variety of unassigns, but they just sit in the chopper until told to get out, and the player is disembarked automatically.
-
I tried lotsa things too but no luck....
I always use the disembark command, but,
why do you wanna avoid using that in the first place?
-
Its just the way I want the mission to work. It might also be part of a cutscene, so it definately needs to work automatically.
-
You need an officer that's AI controlled in the group. He will tell them to disembark. What I did was to add a non playable officer to the squad, so he will give the disembark order.
If you really want the player to be the officer, just have the ai officer leave the group, and assign the player as leader...
-
Hi Flakker.
Just put [_mygroup,_mychopper] exec "disembark.sqs" in your waypoint, and download this little script I've just made for you 8)
-
Problem solved. : ). Thanks everyone
-
hmmm, would be a cool script though.
Let the men rain and die and all LOL hillarious!