Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "..\..\script_macros.hpp"
- /*
- File: fn_radiation.sqf
- Author: Josh L
- Description: Radiation script
- */
- _enter = _this select 0;
- _player = player;
- _damage = getDammage _player;
- _uniform = uniform _player;
- _backpack = backpack _player;
- _goggles = goggles _player;
- _rad1 = ppEffectCreate ["ChromAberration",200];
- _rad2 = ppEffectCreate ["DynamicBlur",500];
- _rad3 = ppEffectCreate ["FilmGrain",2000];
- if (_enter) then {
- _player setVariable ["inRadiation", true, true];
- [3,"<t size='1.5' color='#ff0000'>WARNING</t><br/><t>You have entered a radioactive area!</t>"] remoteExecCall ["life_fnc_broadcast", _player];
- while {(_player getVariable ["inRadiation", false])} do {
- _player say2d "rad";
- for "_i" from 0 to 4 do {
- _rad1 ppEffectEnable true;
- _rad1 ppEffectAdjust [-0.02,0,true];
- _rad1 ppEffectCommit 1;
- _rad2 ppEffectEnable true;
- _rad2 ppEffectAdjust [0.03];
- _rad2 ppEffectCommit 1;
- _rad3 ppEffectEnable true;
- _rad3 ppEffectAdjust [0.12,1.52,3.54,2,2,true];
- _rad3 ppEffectCommit 1;
- };
- if (!(_uniform isEqualTo "U_C_CBRN_Suit_01_White_F") && !(_backpack isEqualTo "B_SCBA_01_F") && !(_goggles isEqualTo "G_RegulatorMask_F")) then {
- _player setDamage (_damage + 0.1);
- };
- uiSleep 5;
- };
- } else {
- _player setVariable ["inRadiation", false, true];
- if (!(_player getVariable ["inRadiation", false])) then {
- [3,"<t size='1.5' color='#ff0000'>WARNING</t><br/><t>You have left a radioactive area!</t>"] remoteExecCall ["life_fnc_broadcast", player];
- };
- _rad1 ppEffectEnable false;
- _rad1 ppEffectAdjust [0,0,true];
- _rad1 ppEffectCommit 1;
- _rad2 ppEffectEnable false;
- _rad2 ppEffectAdjust [0];
- _rad2 ppEffectCommit 1;
- _rad3 ppEffectEnable false;
- _rad3 ppEffectAdjust [0,0,0,0,0,true];
- _rad3 ppEffectCommit 1;
- };
Advertisement
Add Comment
Please, Sign In to add comment