Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.70 KB | None | 0 0
  1. private ["_wind","_wind2","_pos3","_pos4","_streu","_lifetime","_newsdrop","_newsstreu","_obj","_density","_colorCoef","_newspapers","_pos","_velocity","_relPos","_color","_alpha","_ps","_newsParams","_newsRandom","_newsCircle","_newsInterval","_times","_herald","_tribune","_result"];
  2.  
  3. if (!(isDedicated)) then {
  4.  
  5. _obj = _this select 0;
  6. _density = _this select 1;
  7. if (_density < 0) then {_density = 0.07};
  8. _colorCoef = _this select 2;
  9. if (_colorCoef < 0) then {_density = 1};
  10. _newspapers = _this select 3;
  11. _wind = _this select 4;
  12. if (_wind > 10) then {_wind = 10};
  13. if (_wind < -10) then {_wind = -10};
  14. _wind2 = _this select 5;
  15. _pos3 = _this select 6;
  16. _pos4 = _this select 7;
  17. _pos = position _obj;
  18. _alpha = _this select 8;
  19. _streu = _this select 9;
  20. _lifetime = _this select 10;
  21. _newsdrop = _this select 11;
  22. _newsstreu = _this select 12;
  23. _duration = _pos3;
  24. _velocity = [_wind,_wind2,0];
  25. _relPos = [-((_velocity select 1) * (_duration / 2)), _pos4, -6];
  26. _color = [1.0 * _colorCoef, 0.9 * _colorCoef, 0.8 * _colorCoef];
  27. _ps = "#particlesource" createVehicleLocal _pos;
  28. _ps setParticleParams [["\Ca\Data\ParticleEffects\Universal\universal.p3d", 16, 12, 8, 0], "", "Billboard", 1, _duration, _relPos, _velocity, 1, 1.275, 1, 0, [5], [_color + [0], _color + [_alpha], _color + [0]], [1000], 1, 0, "", "", _obj];
  29. _ps setParticleRandom [_lifetime, [30, 30, 0], [0, 0, 0], 1, 0, [0, 0, 0, 0.05], 0, 0];
  30. _ps setParticleCircle [_streu, [0, 0, 0]];
  31. _ps setDropInterval _density;
  32.  
  33. _result = if (_newspapers) then {
  34. _newsParams = [["\ca\Missions_PMC\gnews1.p3d", 1, 0, 1], "", "SpaceObject", 1, 5, [0, 0, 1], [_wind,_wind2,0], 1, 1.25, 1, 0.2, [0,1,1,1,0], [[1,1,1,1]], [0.7], 1, 0, "", "", _obj];
  35. _newsRandom = [0, [30, 30, 0], [5, 5, 0], 2, 0.3, [0, 0, 0, 0], 10, 0];
  36. _newsCircle = [_newsstreu, [0, 1, 0]];
  37. _newsInterval = _newsdrop;
  38. _times = "#particlesource" createVehicleLocal _pos;
  39. _times setParticleParams _newsParams;
  40. _times setParticleRandom _newsRandom;
  41. _times setParticleCircle _newsCircle;
  42. _times setDropInterval _newsInterval;
  43. _newsParams set [0,["\ca\Missions_PMC\gnews2.p3d", 1, 0, 1]];
  44. _herald = "#particlesource" createVehicleLocal _pos;
  45. _herald setParticleParams _newsParams;
  46. _herald setParticleRandom _newsRandom;
  47. _herald setParticleCircle _newsCircle;
  48. _herald setDropInterval _newsInterval;
  49. _newsParams set [0,["\ca\Missions_PMC\gnews3.p3d", 1, 0, 1]];
  50. _tribune = "#particlesource" createVehicleLocal _pos;
  51. _tribune setParticleParams _newsParams;
  52. _tribune setParticleRandom _newsRandom;
  53. _tribune setParticleCircle _newsCircle;
  54. _tribune setDropInterval _newsInterval;
  55. [_ps,_times,_herald,_tribune]
  56. } else {[_ps]};
  57. _result
  58. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement