ACE3/addons/overheating/functions/fnc_checkTemperature.sqf

35 lines
922 B
Plaintext
Raw Normal View History

#include "script_component.hpp"
2015-01-16 02:36:31 +00:00
/*
2015-03-24 04:18:00 +00:00
* Author: Commy2 and esteldunedain
2015-01-16 02:36:31 +00:00
* Make the player check the temperature of his weapon
*
* Arguments:
* 0: Unit checking <OBJECT>
* 1: Unit that has the weapon <OBJECT>
* 2: Weapon <STRING>
2015-02-08 22:54:12 +00:00
*
* Return Value:
* None
2015-01-16 02:36:31 +00:00
*
2015-02-08 22:54:12 +00:00
* Example:
2015-12-15 07:09:26 +00:00
* [player, currentWeapon player] call ace_overheating_fnc_checkTemperature
2015-01-16 02:36:31 +00:00
*
2015-02-08 22:54:12 +00:00
* Public: No
2015-01-16 02:36:31 +00:00
*/
params ["_assistant", "_gunner", "_weapon"];
TRACE_3("params",_assistant,_gunner,_weapon);
2015-04-18 03:40:37 +00:00
2015-01-16 01:00:01 +00:00
// Play animation and report temperature
private _action = "PutDown";
if (_assistant isEqualTo _gunner) then {
_action = getText (configFile >> "CfgWeapons" >> _weapon >> "ACE_checkTemperatureAction");
if (_action == "") then {
_action = "Gear";
};
2015-01-16 01:00:01 +00:00
};
2016-07-12 14:16:01 +00:00
[_assistant, _action] call EFUNC(common,doGesture);
2015-12-15 07:09:26 +00:00
// Waits a sec before displaying the temperature
[FUNC(displayTemperature), [_gunner, _weapon], 1.0] call CBA_fnc_waitAndExecute;