Comrades in Arms Discussion Board

Full Version: Problem spawning chopper in and keeping flyInHeight
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

Any help would be great here... trying to get a chopper to spawn in at bottom left of map and fly to destination keeping its height at 40.

However, using the code below, the chopper spawns in as expected, moves to the waypoints as expected, however it slowly increases its height along the way, and by the time its at the destination its too high to even be seen!

this is the code I am using (I have tried a few variations, and hoping now its just something wrong or missing):

Code:
_airSup1Array = [[100,100], 45, "O_Heli_Attack_02_F", _groupp1] call Bis_fnc_spawnvehicle;
airSup1 = _airSup1Array select 0;
airSup1 flyInHeight 40;

_v1wp1 =_groupp1 addWaypoint [[110,110], 0];
[_groupp1, 0] setWaypointStatements ["true", "airSup1 flyInHeight 40;"];
[_groupp1, 0] setWaypointSpeed "FULL";
[_groupp1, 0] setWaypointBehaviour "COMBAT";
         
_v1wp2 =_groupp1 addWaypoint [getMarkerPos "mrkFirstLocation", 0];
[_groupp1, 1] setWaypointType "LOITER";
[_groupp1, 1] setWaypointLoiterType "CIRCLE";
If memory serves, you need to put the flyinheight in the waypoint statments (via setWaypointStatments)
Thanks, that is in the code above:

Code:
[_groupp1, 0] setWaypointStatements ["true", "airSup1 flyInHeight 40;"];

However... after playing the mission, it seemed to be fine, it was only running in editor seemed to have this issue.  Im not 100% sure though.  I may have changed something, but didnt think I did.

Thank you.
(05-10-2016, 09:00 AM)treendy link Wrote: [ -> ]Thanks, that is in the code above:

Yeah, for the first waypoint. AFAIK, it has to be for all waypoints, because for the currently active waypoint, it always assumes a default height
ah haa! thank you, I will try that out later : )