mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Movement Comments/Formating
This commit is contained in:
parent
114718e8ae
commit
dfdee62732
addons/movement/functions
@ -1,4 +1,18 @@
|
||||
// by commy2
|
||||
/*
|
||||
* Author: commy2
|
||||
* Tests the the player can climb.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The Unit (usually the player) <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* The return value <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* _bool = [player] call ace_movement_fnc_canClimb
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit", "_pos", "_dir"];
|
||||
@ -20,6 +34,6 @@ _checkPos1end = _checkPos1beg vectorAdd _dir;
|
||||
/*
|
||||
drawLine3D [ASLToATL _checkPos0beg, ASLToATL _checkPos0end, [1,0,0,1]];
|
||||
drawLine3D [ASLToATL _checkPos1beg, ASLToATL _checkPos1end, [1,0,0,1]];
|
||||
*/
|
||||
*/
|
||||
|
||||
lineIntersects [_checkPos0beg, _checkPos0end] && {!(lineIntersects [_checkPos1beg, _checkPos1end])}
|
||||
|
@ -1,4 +1,18 @@
|
||||
// by commy2
|
||||
/*
|
||||
* Author: commy2
|
||||
* Make the player climb over short walls.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The Unit (usually the player) <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* [player] call ace_movement_fnc_climb
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private "_unit";
|
||||
@ -6,15 +20,15 @@ private "_unit";
|
||||
_unit = _this select 0;
|
||||
|
||||
if !([_unit] call FUNC(canClimb)) exitWith {
|
||||
[localize "STR_ACE_Movement_CanNotClimb"] call EFUNC(common,displayTextStructured);
|
||||
[localize "STR_ACE_Movement_CanNotClimb"] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
|
||||
if !(_unit getVariable [QGVAR(isClimbInit), false]) then {
|
||||
_unit addEventHandler ["AnimDone", {
|
||||
if (local (_this select 0) && {_this select 1 == "ACE_Climb"}) then {_this call FUNC(handleClimb)};
|
||||
}];
|
||||
_unit addEventHandler ["AnimDone", {
|
||||
if (local (_this select 0) && {_this select 1 == "ACE_Climb"}) then {_this call FUNC(handleClimb)};
|
||||
}];
|
||||
|
||||
_unit setVariable [QGVAR(isClimbInit), true];
|
||||
_unit setVariable [QGVAR(isClimbInit), true];
|
||||
};
|
||||
|
||||
[_unit] call EFUNC(common,fixLoweredRifleAnimation);
|
||||
|
@ -1,4 +1,18 @@
|
||||
// by commy2
|
||||
/*
|
||||
* Author: commy2
|
||||
* Returns the weight (from the loadAbs command) in lbs/kg (based on user option)
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The Unit (usually the player) <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* The return value <NUMBER>
|
||||
*
|
||||
* Example:
|
||||
* _bool = [player] call ace_movement_fnc_getWeight
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit", "_weight"];
|
||||
|
@ -1,4 +1,19 @@
|
||||
// by commy2
|
||||
/*
|
||||
* Author: commy2
|
||||
* Handles the climb animation finishing. Called from "AnimDone" event handler.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The Unit (usually the player) <OBJECT>
|
||||
* 1: The finisehd animation <STRING>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* [player, "ACE_climb"] call ace_movement_fnc_handleClimb
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit", "_anim", "_pos"];
|
||||
|
Loading…
Reference in New Issue
Block a user