ACE3/addons/respawn/functions/fnc_canMoveRallypoint.sqf

34 lines
727 B
Plaintext
Raw Normal View History

/*
Name: ACE_Respawn_fnc_canMoveRallypoint
Author(s):
commy2
Description:
checks if a unit can move a rally point
Parameters:
0: OBJECT - unit
1: OBJECT - side
Returns:
BOOLEAN
*/
#include "script_component.hpp"
2015-01-12 09:07:03 +00:00
private ["_unit", "_side"];
_unit = _this select 0;
_side = _this select 1;
2015-01-12 09:49:21 +00:00
// rallypoint names are defined in CfgVehicles.hpp
_unit getVariable ["ACE_canMoveRallypoint"), false]
2015-01-12 09:07:03 +00:00
&& {!isNull ([
2015-01-13 14:28:03 +00:00
objNull,
missionNamespace getVariable ["ACE_Rallypoint_West", objNull],
missionNamespace getVariable ["ACE_Rallypoint_East", objNull],
missionNamespace getVariable ["ACE_Rallypoint_Independent", objNull]
2015-01-12 09:07:03 +00:00
] select ([west, east, independent] find _side) + 1)}