Jump to content

Sign in to follow this  
swissarmy

Giving spawned UAV waypoints

Recommended Posts

So I'm spawing a UAV in a script which is executed when a unit enters the area of a trigger on the map.

The script to spawn the UAV is this one from the Wiki:

_drone1 = [getMarkerPos "marker1", 200, "O_UAV_01_F", EAST] call BIS_fnc_spawnVehicle;

createVehicleCrew (_drone1 select 0);

This certainly spawns the UAV, but it stays in one spot.

I want to give it waypoints, but what do I give waypoints to? As the crew has no variable name, I don't have a variable to use to give orders to. And I tried simply to use the _drone1 variable, but that certainly didn't work.

How do I give waypoints to a UAV that I've spawned???

Share this post


Link to post
Share on other sites

_drone1 = [getMarkerPos "marker1", 200, "O_UAV_01_F", EAST] call BIS_fnc_spawnVehicle;
createVehicleCrew (_drone1 select 0);

_vehicleObject = _drone1 select 0;//vehicle object
_vehicleCrew = _drone1 select 1;// vehicle crew
_vehicleGrp = _drone1 select 2;// group of vehicle

_wp = _vehicleGrp addWaypoint [_pos, 200];

BIS_fnc_spawnVehicle returns: Array - 0: created vehicle (Object), 1: all crew (Array of Objects), 2: vehicle's group (Group).

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  

×