Advertisement
Guest User

Untitled

a guest
Dec 11th, 2019
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.13 KB | None | 0 0
  1. /*
  2. OPTRE_Drake_CryoShower
  3. */
  4.  
  5. hint "hello";
  6.  
  7. params
  8. [
  9. "_object",
  10. ["_power",1.4], // Power modifier of water stream
  11. ["_count",3],
  12. ["_sizeFactor",1]
  13. ];
  14.  
  15.  
  16.  
  17. private _particles = [];
  18.  
  19. // Iterate through all memory points
  20. for "_i" from 1 to _count do
  21. {
  22. // Calculate position & direction of particle effects
  23. private _pos = _object selectionPosition format["shower_%1_pos",_i];
  24. private _dir = _object selectionPosition format["shower_%1_dir",_i];
  25. private _vector = ((_object modelToWorldVisual _pos) vectorFromTo (_object modelToWorld _dir)) vectorMultiply _power;
  26.  
  27. // Create particle effect
  28. private _particle = "#particlesource" createVehicleLocal [0,0,0];
  29. _particle attachTo [_object,[0,0,0]];
  30. _particle setParticleCircle [0, [0, 0, 0]];
  31. _particle setParticleRandom [0, [0, 0, 0], [0, 0, 0], 53, 0.25, [0, 0, 0, 1], 0, 0];
  32. _particle setParticleParams [["\A3\data_f\Cl_water", 1, 0, 0], "", "Billboard", 1, 1.25, _pos, _vector, 0, 1.275*1.45, 1, 0, [0.1*_sizeFactor, 0.7*_sizeFactor,0.9*_sizeFactor], [[1, 1, 1, 0.02], [1, 1, 1, 0.001]], [1], 0, 0, "", "", _object];
  33. _particle setDropInterval 0.02;
  34.  
  35. // Add particle to array
  36. _particles pushBack _particle;
  37. };
  38.  
  39. /*
  40. // Unhide mist effect & animate valve
  41. if(local _object)then
  42. {
  43. //_object animateSource ["Valve_Source",1];
  44. _object animateSource ["Hide_Mist_Source",0,true];
  45. _object setVariable ["BIN_Shower_Stop",false,true];
  46. };
  47. */
  48.  
  49. // Create sounds effect
  50. private _sound = "DeconShower_01_sound_F" createVehicleLocal [0,0,0];
  51. //private _sound = createSoundSource ["Sound_DeconShower_01_loop" , [0,0,1], [], 0];
  52. _sound setPosASL (getPosASLVisual _object);
  53.  
  54. // Update objects list to delete
  55. _object setVariable ["bin_deconShower_objects",[_sound] + _particles];
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68. /*
  69. bin_fnc_deconShowerAnimStop
  70. Delete all sound sources attachted to decon shower in case it's destroyed or deleted
  71. */
  72. params
  73. [
  74. "_object"
  75. ];
  76.  
  77. _object call bin_fnc_deconShowerDelete;
  78.  
  79. if(!local _object)exitWith{};
  80.  
  81. _object animateSource ["Hide_Mist_Source",1,true];
  82. _object animateSource ["Valve_Source",0];
  83. _object setVariable ["BIN_Shower_Stop",true,true];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement