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
-
All you have to do is shoot down the chopper and watch when it crashes into the water. So, what do you think?
-
Nice splash effect :good:
-
I like it! Good work.
-
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 :
_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.
-
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.
-
You could use a waitUntil to wait until the chopper is at 0 altitude before continuing with the splash. Something like this:
waitUntil {(_chopper getPos select 2) <= 0.5};
-
Only if the _chopper variable persists after the chopper is dead?
-
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.