Home   Help Search Login Register  

Author Topic: Fountain water  (Read 1326 times)

0 Members and 1 Guest are viewing this topic.

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Fountain water
« on: 03 Jun 2006, 12:47:58 »
Code: [Select]
;mandofountain.sqs by Mandoble
;Generates water from fountains
;Arguments:
; fountain object
; [x,y,z] deltas relative to fountain position to adjust pipe placement
; Initial horizontal angle from where the water will spread
; Horizontal arc from initial angle from where the water will spread
; Initial horizontal speed of water drops in m/s (between 0.2 and 1.0)
; Number of simultaneous drops
;
; Example:
; [fuente1,[0,0,3.2],0,360,0.5,16]exec"mandofountain.sqs"
;
_fuente   = _this select 0
_delta    = _this select 1
_arcini   = _this select 2
_deg      = _this select 3
_spd      = _this select 4
_numdrops = _this select 5

_color = [[1,1,1,0.3],[0.5,1,1,0.2],[1,1,1,0.2],[0.5,1,1,0.2],[1,1,1,0.2],[0.5,1,1,0.2],[0.5,1,1,0.8],[1,1,1,1]]
_size = [0.05,0.05,0.2,0.2,0.1,0.3]

_dur = 3
_rot  = 1
_pos = [(getPos _fuente select 0)+(_delta select 0),(getPos _fuente select 1)+(_delta select 1),(getPos _fuente select 2)+(_delta select 2)]

_mass = 2.0
_vol  = 1

#drops
_i = 0
#drop
_ang = _arcini + random(_deg)
_vel = [sin(_ang)*_spd, cos(_ang)*_spd, 2]
drop["cl_water","","Billboard",100,_dur,_pos,_vel,_rot,_mass,_vol,0,_size,_color,[1,0,1,0,1],1,0.1,"","",""]
_i = _i + 1
?_i < _numdrops:goto "drop"
?damage _fuente > 0.5:exit
~0.01
goto "drops"