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:
|
2016-06-13 16:54:19 +00:00
|
|
|
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/environment/EPOCH_client_earthQuake.sqf
|
2015-12-15 22:43:26 +00:00
|
|
|
|
|
|
|
Example:
|
2016-04-08 20:21:46 +00:00
|
|
|
[_location] call EPOCH_client_earthQuake
|
2015-12-15 22:43:26 +00:00
|
|
|
|
|
|
|
Parameter(s):
|
|
|
|
_this: ARRAY - Locaton of epicenter
|
|
|
|
|
|
|
|
Returns:
|
|
|
|
Script handle
|
|
|
|
*/
|
2016-09-01 00:40:18 +00:00
|
|
|
//[[[cog import generate_private_arrays ]]]
|
|
|
|
private ["_distance","_intensity"];
|
|
|
|
//[[[end]]]
|
|
|
|
params [["_epicenter",[0,0,0],[[]] ] ];
|
2015-09-14 20:55:36 +00:00
|
|
|
_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;
|