OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Flakker on 20 Apr 2003, 20:47:26

Title: Its raining men
Post 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?
Title: Re:Its raining men
Post by: kingneb on 20 Apr 2003, 21:07:15
 :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.  
Title: Re:Its raining men
Post by: Flakker on 20 Apr 2003, 21:11:12
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'.
Title: Re:Its raining men
Post by: macguba on 20 Apr 2003, 21:17:20
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 .....
Title: Re:Its raining men
Post by: MadFred on 20 Apr 2003, 22:03:55
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.




 
Title: Re:Its raining men
Post by: Flakker on 20 Apr 2003, 22:23:20
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.
Title: Re:Its raining men
Post by: MadFred on 20 Apr 2003, 22:40:39
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?
Title: Re:Its raining men
Post by: Flakker on 20 Apr 2003, 23:56:49
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.
Title: Re:Its raining men
Post by: Bad Maniac on 21 Apr 2003, 01:20:27
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...
Title: Re:Its raining men
Post by: Igor Drukov on 21 Apr 2003, 02:44:18
Hi Flakker.
Just put [_mygroup,_mychopper] exec "disembark.sqs" in your waypoint, and download this little script I've just made for you  8)
Title: Re:Its raining men
Post by: Flakker on 21 Apr 2003, 19:24:06
Problem solved. : ). Thanks everyone
Title: Re:Its raining men
Post by: SharkDog on 21 Apr 2003, 21:08:05
hmmm, would be a cool script though.


Let the men rain and die and all LOL hillarious!