Advertisement
Guest User

Untitled

a guest
Dec 11th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 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. private _particles = [];
  16.  
  17. // Iterate through all memory points
  18. for "_i" from 1 to 2 do
  19. {
  20. // Calculate position & direction of particle effects
  21. private _pos = _object selectionPosition format["shower_%1_pos",_i];
  22. private _dir = _object selectionPosition format["shower_%1_dir",_i];
  23. private _vector = ((_object modelToWorldVisual _pos) vectorFromTo (_object modelToWorld _dir)) vectorMultiply _power;
  24.  
  25. // Create particle effect
  26. private _particle = "#particlesource" createVehicleLocal [0,0,0];
  27. _particle attachTo [_object,[0,0,0]];
  28. _particle setParticleCircle [0, [0, 0, 0]];
  29. _particle setParticleRandom [0, [0, 0, 0], [0, 0, 0], 53, 0.25, [0, 0, 0, 1], 0, 0];
  30. _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];
  31. _particle setDropInterval 0.02;
  32.  
  33. // Add particle to array
  34. _particles pushBack _particle;
  35. };
  36.  
  37. // Create sounds effect
  38. private _sound = "DeconShower_01_sound_F" createVehicleLocal [0,0,0];
  39. _sound setPosASL (getPosASLVisual _object);
  40.  
  41. sleep 3; // time till sound / effects are deleted.
  42.  
  43. {deleteVehicle _x;} forEach [_sound] + _particles;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement