PDA

View Full Version : COOP- How to start playable units in choppers



jimbojones
Dec 20 2006, 13:41
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

])rStrangelove
Dec 20 2006, 14:03
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. http://forums.bistudio.com/oldsmileys/smile_o.gif

jimbojones
Dec 20 2006, 15:17
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

Ruckus
Dec 20 2006, 15:21
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

jimbojones
Dec 20 2006, 15:33
excellent, i appreciate it very much. I will experiment now http://forums.bistudio.com/oldsmileys/biggrin_o.gif

rwillis
Dec 20 2006, 18:04
Does <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">&#34;_x moveincargo choppername&#34; foreach units this[/QUOTE] not work anymore?

Donnervogel
Dec 20 2006, 20:55
Does <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">&#34;_x moveincargo choppername&#34; foreach units this not work anymore?[/QUOTE]
it does but IIRC you can&#39;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;[/QUOTE]
this worked in OFP too btw.

rwillis
Dec 20 2006, 21:41
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;[/QUOTE]
into the group leader&#39;s init field will automatically make their group enter into the cargo of vehiclename

jimbojones
Dec 22 2006, 15:15
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??

Balschoiw
Dec 22 2006, 16:03
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 (http://www.flashpoint1985.com/cgi-bin/ikonboard311/ikonboard.cgi?act=ST;f=71;t=56112)

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

Edit: Santa has dropped some typos... http://forums.bistudio.com/oldsmileys/xmas_o.gif

Espectro
Dec 24 2006, 12:17
Yea, and then use the setpos command in the choppers init line.

])rStrangelove
Dec 25 2006, 00:07
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... http://forums.bistudio.com/oldsmileys/tounge2.gif