xenom 0 Posted October 17, 2004 It's a nice and interesting script, very usefull and it can be added to all units (but the script is designed for aircrafts) it can show effects of speed on water or sand, the script adds the effect to the missiles too (if the aircraft is armed with missiles). <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ;[vehicle,height,distance,size max] exec "MovingWater.sqs" ?(_this select 0): goto "missile" _vehicle = _this select 0 _height = (_this select 1) + 10 _distance = _this select 2 _sizeInc = _this select 3 _vehicle addEventHandler ["fired", {[true,_this] exec "MovingWater.sqs"}] goto "next" #missile _fired = _this select 1 _firing = _fired select 0 _ammo = _fired select 4 _vehicle = nearestObject [_firing, _ammo] _height = 15 _distance = 1.5 _sizeInc = 2 #next _sensor = "EmptyDetector" createVehicle [0,0,0] _calcH = {private["_result"]; _sensor setpos [getpos _this select 0, getpos _this select 1, 0]; _result = getpos _sensor select 2; _result}; ;===================================== #mainloop @((getpos _vehicle select 2) < _height) and (speed _vehicle > (90+random(10))) #loop _initH = abs(_vehicle call _calcH) ?_initH >= 2.5: _shape = "cl_basic"; _color = [[0.5,0.46,0.4,0.8],[0.5,0.46,0.4,0.7],[0.5,0.46,0.4,0.6],[0.5,0.46,0.4,0.4]] ?_initH < 2.5: _shape = "cl_water"; _color = [[0.8,0.8,0.85,0.5],[0.8,0.8,0.9,0.4],[0.8,0.8,1,0.3],[0.8,0.8,1,0.2]] _lifetime = (speed _vehicle) / 100 ?((speed _vehicle) <= 1200): _size = (speed _vehicle) / (490 + random(10)) + random(_sizeInc) ?((speed _vehicle) > 1200): _size = 2.6 + random(_sizeInc) _x = (GetPos _vehicle select 0) + _Distance * cos (getDir _vehicle) _y = (GetPos _vehicle select 1) - _Distance * sin (getDir _vehicle) drop [_shape, "", "Billboard", _lifetime, _lifetime, [_x, _y,0], [(velocity _vehicle select 0)/2,(velocity _vehicle select 1)/2,0], 0, 0.195, 0.157, 0.05, [_size,1], _color, [0], 0.1, 0.2, "", "", ""] _x = (GetPos _vehicle select 0) - _Distance * cos (getDir _vehicle) _y = (GetPos _vehicle select 1) + _Distance * sin (getDir _vehicle) drop [_shape, "", "Billboard", _lifetime, _lifetime, [_x, _y,0], [(velocity _vehicle select 0)/2,(velocity _vehicle select 1)/2,0], 0, 0.19, 0.157, 0.05, [_size,1], _color, [0], 0.1, 0.2, "", "", ""] ~0.0001 ?(getpos _vehicle select 2) < _height: goto "loop" ?(alive _vehicle): goto "mainloop" exit you must call the script "MovingWater.sqs", or the script doesn't work. for call script, add this script into the init field of the aircraft: [this,min height of the aircraft to show the effect (m),distance between two wakes,max size of the particles] exec "MovingWater.sqs" (sorry for bad english) Share this post Link to post Share on other sites
enigma_x 0 Posted October 17, 2004 looks nice, i'll try it sometime when i understand putting things together, like .sqm files. i just got the nuke to work btw, i need the editor upgrade, and its soo cool, especailly when you can get killed when i is radius! Share this post Link to post Share on other sites
Commando84 0 Posted October 17, 2004 very cool script! Got to try this when i get home from school. Share this post Link to post Share on other sites
nephilim 0 Posted October 18, 2004 nice one but wasnt such a script (not completally)in vitjas effect pack? btw the water normally splashes up in lines where the engines are ;) anyway quite nice script Share this post Link to post Share on other sites
MEDICUS 0 Posted October 18, 2004 @xenom: Looks very nice. Just put the "water-dust" lines a little bit nearer to the engine. but wasnt such a script (not completally)in vitjas effect pack? Yes, if you talk about this one: (Pics by C4P741N) [Topic of Effect pack] MEDICUS Share this post Link to post Share on other sites
xenom 0 Posted October 18, 2004 @xenom:Looks very nice. Just put the "water-dust" lines a little bit nearer to the engine. but wasnt such a script (not completally)in vitjas effect pack? Yes, if you talk about this one: (Pics by C4P741N) [Topic of Effect pack] MEDICUS nice, but my script applies the effect to missiles too. Share this post Link to post Share on other sites
Sniperwolf572 758 Posted October 18, 2004 Very nice script,but can you please modify it (or add an option to change where do you want the splash to appear) to be near the engines? IMHO Adjustable setting would be better since not all aircraft have engine in the same place. Share this post Link to post Share on other sites
xenom 0 Posted October 18, 2004 Very nice script,but can you please modify it (or add an option to change where do you want the splash to appear) to be near the engines?IMHO Adjustable setting would be better since not all aircraft have engine in the same place. Â yes, i can try this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ;[vehicle,height,distance,size max, DISTANCE FROM CENTER OF THE AIRPLANE] exec "MovingWater.sqs" ?(_this select 0): goto "missile" _vehicle = _this select 0 _height = (_this select 1) + 10 _distance = _this select 2 _sizeInc = _this select 3 _distanceFromCenter = _this select 4 _vehicle addEventHandler ["fired", {[true,_this] exec "MovingWater.sqs"}] goto "next" #missile _fired = _this select 1 _firing = _fired select 0 _ammo = _fired select 4 _vehicle = nearestObject [_firing, _ammo] _height = 15 _distance = 1.5 _sizeInc = 2 #next _sensor = "EmptyDetector" createVehicle [0,0,0] _calcH = {private["_result"]; _sensor setpos [getpos _this select 0, getpos _this select 1, 0]; _result = getpos _sensor select 2; _result}; ;===================================== #mainloop @((getpos _vehicle select 2) < _height) and (speed _vehicle > (90+random(10))) #loop _initH = abs(_vehicle call _calcH) ?_initH >= 2.5: _shape = "cl_basic"; _color = [[0.5,0.46,0.4,0.8],[0.5,0.46,0.4,0.7],[0.5,0.46,0.4,0.6],[0.5,0.46,0.4,0.4]] ?_initH < 2.5: _shape = "cl_water"; _color = [[0.8,0.8,0.85,0.5],[0.8,0.8,0.9,0.4],[0.8,0.8,1,0.3],[0.8,0.8,1,0.2]] _lifetime = (speed _vehicle) / 100 ?((speed _vehicle) <= 1200): _size = (speed _vehicle) / (490 + random(10)) + random(_sizeInc) ?((speed _vehicle) > 1200): _size = 2.6 + random(_sizeInc) _x = (GetPos _vehicle select 0) + _Distance * cos (getDir _vehicle) _y = (GetPos _vehicle select 1) - _Distance * sin (getDir _vehicle) drop [_shape, "", "Billboard", _lifetime, _lifetime, [_x, _y,0], [(velocity _vehicle select 0)/2,(velocity _vehicle select 1)/2,0], 0, 0.195, 0.157, 0.05, [_size,1], _color, [0], 0.1, 0.2, "", "", ""] _x = ((GetPos _vehicle select 0) - _Distance * cos (getDir _vehicle)) - _DistanceFromCenter _y = ((GetPos _vehicle select 1) + _Distance * sin (getDir _vehicle)) - _DistanceFromCenter drop [_shape, "", "Billboard", _lifetime, _lifetime, [_x, _y,0], [(velocity _vehicle select 0)/2,(velocity _vehicle select 1)/2,0], 0, 0.19, 0.157, 0.05, [_size,1], _color, [0], 0.1, 0.2, "", "", ""] ~0.0001 ?(getpos _vehicle select 2) < _height: goto "loop" ?(alive _vehicle): goto "mainloop" exit ..but i'm not sure that it's work Share this post Link to post Share on other sites
Sniperwolf572 758 Posted October 18, 2004 Yeah yeah I know I figured it out right after the post while I was testing it some more,I didn't figure that the distance parameter was "the distance parameter" but the how much will the effect be behind the plane,sorry for the stupid question. Share this post Link to post Share on other sites
T J 0 Posted October 18, 2004 Does anybody have a picture or footage of this happening in real aircraft? imho it would look better if so if it was barely visible, for instance with a transparency figure of 0.25 or so, and timed to fade over the droplets lifetime. Share this post Link to post Share on other sites
Madus_Maximus 0 Posted October 18, 2004 Does anybody have a picture or footage of this happening in real aircraft?imho it would look better if so if it was barely visible, for instance with a transparency figure of 0.25 or so, and timed to fade over the droplets lifetime. Indeed one does... just let me upload it. (I'll edit this post when i've done it) EDIT: Here it is, sorry about the quality but meh. Share this post Link to post Share on other sites
xenom 0 Posted October 18, 2004 Does anybody have a picture or footage of this happening in real aircraft?imho it would look better if so if it was barely visible, for instance with a transparency figure of 0.25 or so, and timed to fade over the droplets lifetime. Indeed one does... just let me upload it. (I'll edit this post when i've done it) EDIT: Here it is, sorry about the quality but meh. [im]http://tow.ofpcentral.com/teamfiles/madmax/F-14.jpg[/img] very good, i will modify the script. tnx. i will apply this effect to missiles too Share this post Link to post Share on other sites
AgentFox2 0 Posted October 18, 2004 That's a painting, I believe. Share this post Link to post Share on other sites
Lin_Chino 0 Posted October 19, 2004 The water effect is REAL...in REAL airplanes, (i saw it in some videos). Está del carajo Xenom. Share this post Link to post Share on other sites
Madus_Maximus 0 Posted October 19, 2004 Aye, I've seen it too when watching some random stuff on Discovery Wings (as you do). Very impressive, shows you the true power of those engines. Share this post Link to post Share on other sites
Placebo 29 Posted October 19, 2004 xenom remove image tags when quoting please Share this post Link to post Share on other sites
Nemesis6 0 Posted October 19, 2004 Very nice indeed. But I had a little trouble with the fired eventhandler. The stuff under the shot projectile appears, yet, as long as the shots below the height, I keep getting an error about the drop array. I can't see which part it's complaining about, though. Share this post Link to post Share on other sites
xenom 0 Posted October 24, 2004 xenom remove image tags when quoting please ok sorry @nemesis: uhm... i will try to fix it Share this post Link to post Share on other sites