Hi, I cannot find what command to use to make an attack heli to face certain position while flying with "SAD" waypoint. I spawn it and add waypoints with this
/*
_mrk is the flag marker, string
_heli is the attack helicopter className, string
_arrival is the time from zone activation to spawning the attack heli, integer
_force is how many attack helicopter will come one after another, integer
*/
params ["_mrk", "_heli","_arrival","_force"];
for "_i" from 0 to _force do {
sleep _arrival;
deleteVehicle attackHeli;
{deleteVehicle _x} forEach units attackHeliGRP;
_atkHeliPos = [[[(getMarkerPos _mrk),4000]], [[(getMarkerPos _mrk),3000]]] call BIS_fnc_randomPos;
_attackPosA = [[[(getMarkerPos _mrk),400]], []] call BIS_fnc_randomPos;
_attackPosA set [2, 200];
_attackPosB = [[[(getMarkerPos _mrk),400]], []] call BIS_fnc_randomPos;
_attackPosB set [2, 200];
_attackPosC = [[[(getMarkerPos _mrk),400]], []] call BIS_fnc_randomPos;
_attackPosC set [2, 200];
private _delPos = [[[(getMarkerPos _mrk),4000]], [[(getMarkerPos _mrk),3000]]] call BIS_fnc_randomPos;
_delPos set [2, 200];
attackHeliGRP = createGroup [west, true];
attackHeli = createVehicle [_heli, _atkHeliPos, [], 0, "FLY"];
attackHeliGRP createVehicleCrew attackHeli;
attackHeliGRP setBehaviourStrong "COMBAT";
attackHeli flyInHeight 200;
attackHeli limitSpeed 100;
private _wp1 = attackHeliGRP addWaypoint [_attackPosA, 0];
_wp1 setWaypointType "SAD";
_wp1 setWaypointTimeout [60, 120, 60];
private _wp2 = attackHeliGRP addWaypoint [_attackPosB, 0];
_wp2 setWaypointType "SAD";
_wp2 setWaypointTimeout [60, 120, 60];
private _wp3 = attackHeliGRP addWaypoint [_attackPosC, 0];
_wp3 setWaypointType "SAD";
_wp3 setWaypointTimeout [60, 120, 60];
private _wp3 = attackHeliGRP addWaypoint [_delPos, 0];
_wp3 setWaypointType "MOVE";
_wp3 setWaypointStatements ["true", "deleteVehicleCrew attackHeli; deleteVehicle attackHeli; deleteGroup attackHeliGRP;"];
sleep _arrival;
};
All I want is when the AH64 wait for the next waypoint to face the position it has to defend so the gunner can search for infantry targets, etc.
To troubleshoot, ensure file paths are correct, sound files are in the correct format, and sound settings are properly configured within the game engine.
I completely forgot that was a thing in addAction and might be easier if you don't use CBA3, or don't want to rely on it.
I've notice "this" works for init boxes within the editor, while "_this" works for pretty much everything else. I imagine there's a technical reason for it relating to passing parameters, but I'm not a software developer or computer programmer. 🤷♂️ Perhaps someone more knowledgeable than me can answer that.