Guest User

Untitled

a guest
May 27th, 2023
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.00 KB | None | 0 0
  1. #include "..\..\script_macros.hpp"
  2. /*
  3. File: fn_radiation.sqf
  4. Author: Josh L
  5.  
  6. Description: Radiation script
  7. */
  8. _enter = _this select 0;
  9.  
  10. _player = player;
  11. _damage = getDammage _player;
  12. _uniform = uniform _player;
  13. _backpack = backpack _player;
  14. _goggles = goggles _player;
  15. _rad1 = ppEffectCreate ["ChromAberration",200];
  16. _rad2 = ppEffectCreate ["DynamicBlur",500];
  17. _rad3 = ppEffectCreate ["FilmGrain",2000];
  18.  
  19. if (_enter) then {
  20. _player setVariable ["inRadiation", true, true];
  21. [3,"<t size='1.5' color='#ff0000'>WARNING</t><br/><t>You have entered a radioactive area!</t>"] remoteExecCall ["life_fnc_broadcast", _player];
  22.  
  23. while {(_player getVariable ["inRadiation", false])} do {
  24. _player say2d "rad";
  25.  
  26. for "_i" from 0 to 4 do {
  27. _rad1 ppEffectEnable true;
  28. _rad1 ppEffectAdjust [-0.02,0,true];
  29. _rad1 ppEffectCommit 1;
  30. _rad2 ppEffectEnable true;
  31. _rad2 ppEffectAdjust [0.03];
  32. _rad2 ppEffectCommit 1;
  33. _rad3 ppEffectEnable true;
  34. _rad3 ppEffectAdjust [0.12,1.52,3.54,2,2,true];
  35. _rad3 ppEffectCommit 1;
  36. };
  37.  
  38. if (!(_uniform isEqualTo "U_C_CBRN_Suit_01_White_F") && !(_backpack isEqualTo "B_SCBA_01_F") && !(_goggles isEqualTo "G_RegulatorMask_F")) then {
  39. _player setDamage (_damage + 0.1);
  40. };
  41.  
  42. uiSleep 5;
  43. };
  44. } else {
  45. _player setVariable ["inRadiation", false, true];
  46.  
  47. if (!(_player getVariable ["inRadiation", false])) then {
  48. [3,"<t size='1.5' color='#ff0000'>WARNING</t><br/><t>You have left a radioactive area!</t>"] remoteExecCall ["life_fnc_broadcast", player];
  49. };
  50.  
  51. _rad1 ppEffectEnable false;
  52. _rad1 ppEffectAdjust [0,0,true];
  53. _rad1 ppEffectCommit 1;
  54. _rad2 ppEffectEnable false;
  55. _rad2 ppEffectAdjust [0];
  56. _rad2 ppEffectCommit 1;
  57. _rad3 ppEffectEnable false;
  58. _rad3 ppEffectAdjust [0,0,0,0,0,true];
  59. _rad3 ppEffectCommit 1;
  60. };
Advertisement
Add Comment
Please, Sign In to add comment