ACE3/addons/overheating/functions/fnc_checkTemperature.sqf

33 lines
756 B
Plaintext
Raw Normal View History

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:
2015-02-08 22:54:12 +00:00
* 0: Player <OBJECT>
* 1: Weapon <STRING>
*
* 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
*/
2015-12-15 07:09:26 +00:00
#include "script_component.hpp"
2015-12-15 07:09:26 +00:00
params ["_player", "_weapon"];
TRACE_2("params",_player,_weapon);
2015-04-18 03:40:37 +00:00
2015-01-16 01:00:01 +00:00
// Play animation and report temperature
2015-12-15 07:09:26 +00:00
private _action = getText (configFile >> "CfgWeapons" >> _weapon >> "ACE_checkTemperatureAction");
2015-01-16 01:00:01 +00:00
if (_action == "") then {
2015-12-15 07:09:26 +00:00
_action = "Gear";
2015-01-16 01:00:01 +00:00
};
2015-01-16 01:00:01 +00:00
_player playActionNow _action;
2015-12-15 07:09:26 +00:00
// Waits a sec before displaying the temperature
[FUNC(displayTemperature), [_player, _weapon], 1.0] call EFUNC(common,waitAndExecute);