ACE3/addons/goggles/functions/fnc_getExplosionIndex.sqf

25 lines
456 B
Plaintext
Raw Normal View History

/*
2015-09-29 16:51:24 +00:00
* Author: Garth 'L-H' de Wet, commy2
* Turns 0-1 damage of explosion Event into a rating system of 0-3
*
* Arguments:
* 0: The amount of damage <NUMBER>
*
* Return Value:
* The rating [0-3] <NUMBER>
*
* Example:
2015-04-18 03:40:37 +00:00
* 0.05 call ace_goggles_fnc_getExplosionIndex;
*
* Public: No
*/
2015-09-29 16:51:24 +00:00
#include "script_component.hpp"
2015-09-29 16:51:24 +00:00
params ["_damage"];
2015-09-29 16:51:24 +00:00
if (_damage <= 0.04) exitWith {0};
if (_damage <= 0.06) exitWith {1};
if (_damage <= 0.09) exitWith {2};
3