mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
31 lines
802 B
Plaintext
31 lines
802 B
Plaintext
/*
|
|
* Author: commy2
|
|
* Checks if a unit can move a rally point.
|
|
*
|
|
* Arguments:
|
|
* 0: Unit <OBJECT>
|
|
* 1: Side <SIDE>
|
|
*
|
|
* Return Value:
|
|
* Can move <BOOL>
|
|
*
|
|
* Example:
|
|
* [ACE_Player, side ACE_Player] call ace_respawn_fnc_canMoveRallypoint
|
|
*
|
|
* Public: No
|
|
*/
|
|
#include "script_component.hpp"
|
|
|
|
params ["_unit", "_side"];
|
|
|
|
// player has to be a rallypoint mover. group leader by default
|
|
if !(_unit getVariable ["ACE_canMoveRallypoint", false]) exitWith {false};
|
|
|
|
// rallypoint of that side has to exist
|
|
!isNull ([
|
|
objNull,
|
|
missionNamespace getVariable ["ACE_Rallypoint_West", objNull],
|
|
missionNamespace getVariable ["ACE_Rallypoint_East", objNull],
|
|
missionNamespace getVariable ["ACE_Rallypoint_Independent", objNull]
|
|
] select ([west, east, independent] find _side) + 1) // return
|