Jump to content
Sign in to follow this  
PhelanKA7

Createvehicle question

Recommended Posts

I've got a problem with creating any sort of flying vehicle in a script. With the following script, every flying vehicle I try to use just nose dives into the ground. It's more noticeable over water. Over land, the object attempts to land.

Also note that it has nothing to do with the waypoints. If I take those out, the chopper does the same thing. What am I missing? I tried using setVelocity, but that made it even more messed up.

With the waypoints in, the chopper just lands and does nothing if my "Flyin1" object is over land. When Flyin1 is over the water, the chopper just crashes into the sea.

Thanks for any help.

helo = createVehicle ["Mi17_CDF", position Flyin1, [], 0, "FLY"];
helogrp = group leader helo;

helo flyInHeight 50;

helo setDir 270;

sleep 1;

_wp0 = helogrp AddWaypoint[position Flyin1, 0];
[helogrp, 0] setWaypointType "MOVE";
[helogrp, 0] setWaypointSpeed "FULL";
[helogrp, 0] setWaypointCombatMode "BLUE";
[helogrp, 0] setWaypointBehaviour "CARELESS";

_wp1 = helogrp AddWaypoint[GetMarkerPos "Flyin2", 0];
[helogrp, 1] setWaypointType "MOVE";

_wp2 = helogrp AddWaypoint[GetMarkerPos "Flyin3", 0];
[helogrp, 2] setWaypointType "MOVE";

helogrp setCurrentWaypoint [helogrp, 1];

Edited by PhelanKA7

Share this post


Link to post
Share on other sites

Tried using the BIS functions module to see if that works better?

_vehicle = [position, direction,"type", group] call BIS_fnc_spawnVehicle;

Oh and your helo group should start at waypoint 0... Unless there's a reason you skipping it.

Or you can try this script: http://www.armaholic.com/page.php?id=7074

Been tested with helos and they seem to work.

Share this post


Link to post
Share on other sites

createVehicle only makes an empty vehicle. You'd have to createUnit the crew to then move them into it.

Or just use BIS_fnc_spawnVehicle has Murklor said, that'll do all the crew stuff for you.

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  

×