OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting Resources Beta Testing & Submission => Topic started by: Nemesis6 on 03 Apr 2007, 17:54:09

Title: Aircraft water splash (ACCEPTED)
Post by: Nemesis6 on 03 Apr 2007, 17:54:09
All you have to do is shoot down the chopper and watch when it crashes into the water. So, what do you think?
Title: Re: Aircraft water splash
Post by: Mandoble on 03 Apr 2007, 19:21:49
Nice splash effect  :good:
Title: Re: Aircraft water splash
Post by: johnnyboy on 03 Apr 2007, 19:30:27
I like it!  Good work.
Title: Re: Aircraft water splash
Post by: Blanco on 09 Apr 2007, 04:12:35
Almost perfect  :good:

It would be better if the splash effect occurs when the chopper hits the water, not when it already in the water. Actually, same thing with ground explosions, choppers in Arma explode when they are on a ground for a while, not when they hit it.
But that's nitpicking, very nice effect  ;)

Btw, somewhere in your script thereare these 2 lines :

Quote
_x = getpos _gl select 0
_y = getpos _gl select 1

_x and _y are defined before the gamelogic (_gl) is created  ???
I removed these 2 lines and script still works fine.

Title: Re: Aircraft water splash
Post by: Nemesis6 on 11 Apr 2007, 15:07:29
Well, the problem is that the the script is triggered when the object is killed, and the game sees that as when the chopper has actually "exploded". So if a chopper is destroyed with an RPG in the air and crashes in the water, the effect will be instantaneous. But the most part, the chopper will "explode" when it hits the water, as witnessed, there are times where it doesn't.
Title: Re: Aircraft water splash
Post by: ColonelSandersLite on 12 Apr 2007, 13:20:26
You could use a waitUntil to wait until the chopper is at 0 altitude before continuing with the splash.  Something like this:

Code: [Select]
waitUntil {(_chopper getPos select 2) <= 0.5};
Title: Re: Aircraft water splash
Post by: Mr.Peanut on 17 Apr 2007, 16:46:28
Only if the _chopper variable persists after the chopper is dead?
Title: Re: Aircraft water splash (ACCEPTED)
Post by: Vigilante on 04 Sep 2008, 13:27:57
waitUntil {((!alive _chopper) && ((_chopper getPos select 2) <= 0.5)) || ((_chopper getPos select 2) <= 0.5)};

?

maybe put the last position of _chopper into a globalvariable and use that in the script and remember to kill the globalvariable after use in the splash script.