Jump to content
Sign in to follow this  
jimbojones

COOP- How to start playable units in choppers

Recommended Posts

Hello all. I am looking to start a coop mission with playable units in a heli already airborne. From what I am reading it looks like I need to write a script and add the units to the heli, how do I make them playable units and not just an ai filled chopper? I am new to this so I have a hard time piecing it together. I am also not sure how to run this new script right at the start of the mission. Any pointers would be greatly appreciated. Thanks

Share this post


Link to post
Share on other sites

Setup the units in editor as playable, get the heli in position where you want it to start, name it heli1 for example. Then add this into init-line of each playble unit:

this moveincargo heli1;

If you have playable pilot and gunner, use moveindriver and moveingunner instead. smile_o.gif

Share this post


Link to post
Share on other sites

thank you for your help. Can i set a parameter in the activation field for the chopper to make it fly at a specific height, like stay low to the ground. Thanks again

Share this post


Link to post
Share on other sites
thank you for your help.  Can i set a parameter in the activation field for the chopper to make it fly at a specific height, like stay low to the ground.  Thanks again

choppername flyinHeight x

where choppername is the name of your chopper unit and x is the height in meters

Share this post


Link to post
Share on other sites

Does <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">"_x moveincargo choppername" foreach units this not work anymore?

Share this post


Link to post
Share on other sites
Does <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">"_x moveincargo choppername" foreach units this
not work anymore?

it does but IIRC you can't use "" signs for code anymore. Instead use waved brackets <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">{_x moveincargo choppername} forEach units this;

this worked in OFP too btw.

Share this post


Link to post
Share on other sites

thank you sir

To the original poster:

Putting

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">{_x moveInCargo vehiclename} forEach units this;

into the group leader's init field will automatically make their group enter into the cargo of vehiclename

Share this post


Link to post
Share on other sites

Thanks again, everyone codes worked great. I still cannt figure out for myself how to start the chopper running full speed already airborn. The flyinheight works great once moving but not sure how to start already runnign in the air. I tried setpos but kept getting errors. I also noticed that once you use the flyinheight the choppers lights turn off at night??

Share this post


Link to post
Share on other sites
Quote[/b] ] I still cannt figure out for myself how to start the chopper running full speed already airborn.

Select "flying" in the dropdown menu "special" of unitscreen in editor.

I may furthermore redirect you to this thread

You will find a lot of info on basic editing if you search the OFP editing thread.

Edit: Santa has dropped some typos... xmas_o.gif

Share this post


Link to post
Share on other sites

To get something moving from mission start you had to use a 3d vector for movement direction and speed. I dont remember the command exactly, something like setvector or just vector... tounge2.gif

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×