mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
32 lines
688 B
Plaintext
32 lines
688 B
Plaintext
|
/*
|
||
|
* Author: Jonpas
|
||
|
* Checks if Tactical Ladder is empty (no one climbing it).
|
||
|
*
|
||
|
* Arguments:
|
||
|
* 0: Ladder <OBJECT>
|
||
|
*
|
||
|
* Return Value:
|
||
|
* Can Be Picked Up <BOOL>
|
||
|
*
|
||
|
* Example:
|
||
|
* [ladder] call ace_tacticalladder_fnc_isLadderEmpty;
|
||
|
*
|
||
|
* Public: No
|
||
|
*/
|
||
|
#include "script_component.hpp"
|
||
|
|
||
|
params ["_ladder"];
|
||
|
|
||
|
private _unitsNearLadder = nearestObjects [_ladder, ["CAManBase"], 4];
|
||
|
TRACE_1("Near Ladder",_unitsNearLadder);
|
||
|
|
||
|
private _ladderEmpty = true;
|
||
|
{
|
||
|
if (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> animationState _x >> "ACE_isLadder") == 1) exitWith {
|
||
|
_ladderEmpty = false;
|
||
|
TRACE_1("On Ladder",_x);
|
||
|
};
|
||
|
} forEach _unitsNearLadder;
|
||
|
|
||
|
_ladderEmpty
|