Epoch/Sources/epoch_code/compile/environment/EPOCH_client_earthQuake.sqf

39 lines
841 B
Plaintext
Raw Normal View History

2015-12-15 22:43:26 +00:00
/*
Author: Aaron Clark - EpochMod.com
Contributors:
Description:
Triggers earthquake with increasing intensity the closer the player
Licence:
Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike
Github:
https://github.com/EpochModTeam/Epoch/tree/master/Sources/epoch_code/compile/environment/EPOCH_client_earthQuake.sqf
Example:
_location call EPOCH_client_earthQuake
Parameter(s):
_this: ARRAY - Locaton of epicenter
Returns:
Script handle
*/
2015-09-14 20:55:36 +00:00
_epicenter = _this;
_distance = player distance _epicenter;
_intensity = 1;
if (_distance < 250) then {
_intensity = 4;
} else {
if (_distance < 500) then {
_intensity = 3;
} else {
if (_distance < 750) then {
_intensity = 2;
};
};
};
2015-12-15 22:43:26 +00:00
_intensity spawn BIS_fnc_earthQuake;