Advertisement
Guest User

Untitled

a guest
Mar 24th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.13 KB | None | 0 0
  1. //---------------------------------------------------------------------- Snow Script by Rübe - Changed a bit by IndeedPete ---------------------------------------------------------------------//
  2.  
  3. /*
  4. Author:
  5. rübe (inspired by I3_DelayingTheBear.Chernarus)
  6.  
  7. Description:
  8. weather script: winter
  9. color filter, light snow particles and ground fog around the player (or given obj)
  10.  
  11. Parameters:
  12. _this select 0: particle source center (object; optional, default = player)
  13.  
  14. */
  15. private ["_obj", "_pos", "_snow", "_fog"];
  16.  
  17. "colorCorrections" ppEffectAdjust [1, 1, 0, [0.01, 0.02, 0.04, 0.01], [0.87, 1.08, 1.196, 0.3], [0.399, 0.287, 0.014, 0.0]];
  18. "colorCorrections" ppEffectCommit 0;
  19. "colorCorrections" ppEffectEnable TRUE;
  20. "filmGrain" ppEffectEnable true;
  21. "filmGrain" ppEffectAdjust [0.03, 1, 1, 0.1, 1, false];
  22. "filmGrain" ppEffectCommit 0;
  23.  
  24. setWind [2.342, 3.108, true];
  25.  
  26. _obj = player;
  27.  
  28. /*
  29. if ((count _this) > 0) then
  30. {
  31. _obj = _this select 0;
  32. };
  33. */
  34.  
  35. _pos = position (vehicle _obj);
  36.  
  37. // snow
  38. _snow = "#particlesource" createVehicleLocal _pos;
  39. _snow setParticleParams [
  40. // GLOBAL PARAMETERS
  41. ["\Ca\Data\cl_water.p3d", // ShapeName
  42. 1, // - Anim Divisor (1 for a 1x1, 8 for a 8x8, etc)
  43. 1, // - Anim Starting Row
  44. 1], // - Number of Frames to Play (speed controlled by animation phase below)
  45. "", // AnimationName (obsolete)
  46. "Billboard", // Type ("Billboard" or "SpaceObject")
  47. 1, // TimerPeriod: The period of calling the "OnTimer" event (in sec).
  48. 7, // LifeTime: Life time of the particle (in sec).
  49.  
  50. // PHYSICAL PARAMETERS
  51. [0, 0, 20.0], // Position: Either 3D coordinate (x, y, z) or name of the selection (Object property!)
  52. [0, 0, -0.35], // MoveVelocity: 3D vector (x, y, z) which describes the velocity vector of the particle direction and speed in m/s.
  53. 1.0, // RotationVelocity: Float number which determines number of rotations in one second.
  54. 0.000001, // Weight: Weight of the particle (kg).
  55. 0.0, // Volume: Volume of the particle (m^3).
  56. 0.4, // Rubbing: Float number without dimension which determines the impact of the density of the environment on this particle. 0 - no impact (vacuum). --> wind/air fraction!
  57.  
  58. // RENDER PARAMETERS (array -> development in time)
  59. [0.17,0.05], // Size: Size of the particle in time to render (m).
  60. [[1.0,1.0,1.0,1.0], // Colour of the particle in time to render (RGBA).
  61. [0.94,0.94,0.96,1.0],
  62. [1.0,1.0,1.0,1.0]],
  63. [0, 1], // AnimationPhase: Phase of the animation in time. (play speed of the selected frames for the Number of Frames to Play; higher == faster)
  64. 0, // RandomDirectionPeriod: Period of change of the velocity vector (s).
  65. 0.01, // RandomdirectionIntensity: Each MoveVelocity component will be changed with random value from interval <0, RandomDirectionIntensity>.
  66. "", // OnTimer: Name of the script to run every period determined by TimerPeriod property. (this == position)
  67. "", // BeforeDestroy: Name of the script to run right before destroying the particle. (this == position)
  68. _obj // object: Object to bind this particle to.
  69. ];
  70. _snow setParticleRandom [
  71. 2, // lifeTime
  72. [35, 35, 10], // position
  73. [0.0, 0.0, -0.1], // moveVelocity
  74. 0.001, // rotationVelocity
  75. 0.05, // size
  76. [0.01, 0.01, 0.01, 0.02], // color
  77. 0.002, // randomDirectionPeriod
  78. 360 // angle
  79. ];
  80. _snow setParticleCircle [
  81. 0, // radius
  82. [0.0, 0.0, -0.1] // velocity
  83. ];
  84. _snow setDropInterval 0.01;
  85.  
  86.  
  87. // ground fog
  88. _fog = "#particlesource" createVehicleLocal _pos;
  89. _fog setParticleParams [
  90. ["\Ca\Data\ParticleEffects\Universal\universal.p3d" , 16, 12, 13, 0], "", "Billboard", 1, 10,
  91. [0, 0, -6], [0, 0, 0], 1, 1.275, 1, 0,
  92. [7,6], [[1, 1, 1, 0], [1, 1, 1, 0.04], [1, 1, 1, 0]], [1000], 1, 0, "", "", _obj
  93. ];
  94. _fog setParticleRandom [3, [55, 55, 0.2], [0, 0, -0.1], 2, 0.45, [0, 0, 0, 0.1], 0, 0];
  95. _fog setParticleCircle [0.1, [0, 0, -0.12]];
  96. _fog setDropInterval 0.01;
  97.  
  98.  
  99. while {true} do
  100. {
  101. _pos = position (vehicle _obj);
  102. _snow setpos _pos;
  103. _fog setpos _pos;
  104. 0 setRain 0;
  105. sleep 1;
  106. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement