2015-01-18 21:50:45 +00:00
|
|
|
/*
|
2015-02-02 09:04:53 +00:00
|
|
|
* Author: Garth 'L-H' de Wet
|
|
|
|
* 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:
|
|
|
|
* _rating = 0.05 call ace_goggles_fnc_getExplosionIndex;
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
2015-01-18 21:50:45 +00:00
|
|
|
private ["_effectIndex"];
|
|
|
|
|
|
|
|
_effectIndex = switch true do {
|
2015-04-06 16:22:43 +00:00
|
|
|
case (_this <= 0.04): {0};
|
|
|
|
case (_this <= 0.06): {1};
|
|
|
|
case (_this <= 0.09): {2};
|
|
|
|
default {3};
|
2015-01-18 21:50:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
_effectIndex
|