Search the Community
Showing results for tags 'getdir'.
Found 2 results
-
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; }; I wonder how to change direction if flying object so when the AH64 wait for the next waypoint to face the position it has to defend and the gunner can search for infantry targets, etc.
-
Hey guys, a bit of a puzzle here. I'm trying to create a trigger that opens a one way gate. Tigger has following conditions: Player present inside trigger. No OpFor within trigger. Gate is alive. Gatekeeper is alive. Players vehicle is facing correct direction. I managed to get everything except the direction so far with this: Activated by player present - this and (alive gatekeeper) and (alive gate02) and (east countside thislist) == 0 However i'm having hard time implementing getdir in to the condition. I managed to get getdir working like this: if (direction (vehicle player) >200) then {hint "Going out"} if (direction (vehicle player) <200) then {hint "Going in"} But how would i make this into a trigger condition? Somehow with _x thislist i would assume..? It's for multiplayer so i can't use command "player" in the trigger. How do you refer to the unit that is inside the tigger instead of "player"?