Jump to content
Sign in to follow this  
NightIntruder

Script for pilots crash-landed on water - help ?

Recommended Posts

I know that there is a bunch of great programmers/coders around. What I would like to achieve is a script for virtual pilots giving them a better life. What's its purpose? The purpose is to give pilots chance of surviving whenever their aircraft break cable during landing on carrier, get cold shot from catapult or crash land on water. Despite of possible ejection, sometimes virtual pilots do not have time to do it or they are not prepared and they get killed at the moment the aircraft hit the water. So, what should be done to make it more realistic:

-

  • script should be activated by aircraft with speed between 0-150 kph and altitude below 15m flying over deep water like sea or lake OR at the moment it hit the deep water
  • whenever the aircraft hit the water being faster then 150 kph it just blows up, period.
  • whenever the aircraft hit the water with speed below 150 it can float on water for a certain time, which depends on how big the aircraft is (the bigger, the longer)
  • if the plane hit the water with speed between 80-150 kph its occupants may get wounds, sratches, bruises randomly (version of compatibility: ACE2)
  • the time of floating should be random in range of 5 to 30 seconds divided between several sizes of aircraft (ie. small ones: 5-15; medium ones: 10-25, large ones: 15-30)
  • when timer is out, the aircraft should start drowning and explode when on the bottom of the sea/lake, but possibly not earlier then app.60 sec after it hit the bottom [to give survivors time for separating themselves from the wreckage with exploding armament]
  • occupants of an aircraft should have possibility to escape beneath the sea, but no longer then until 5 seconds after the aircraft started sinking; the same rule applies to underwater ejection - thus the occupants should be immortal for that period of time spent on seat in the drowning aircraft, to have a chance to do it
  • the script should be implementable into addon from its init or as a standalone mission-oriented script, MP & JIP compatible, light and not specifically checked every cycle if possible or checked but only when aircraft flies above water

Optional: - A2 vanilla version of possible wounds get by occupants during crash (most important)

Optional: - random small chances that aircraft's crew may not be able to get out of the plane, only ejection and vice versa.

Optional: - random small chances that some occupants of an aircraft get killed instantly when hit the water

Optional: - instead of exploding on the bottom of the sea, the aircraft just changes into wreckage without big boom

Optional: - script usable by AI (least important)

Could somebody help me out with this one? I would do it by myself if skilled enough :/

Share this post


Link to post
Share on other sites

Ok, lets start from the very beginning - how to check whether aircraft flies over deep water? Should "isFlatEmpty" does the trick ? Or should I use "surfaceIsWater" ?

Edited by NightIntruder

Share this post


Link to post
Share on other sites

i used this in unsung for working out if the guy was swimming, to allow him to inflate his liferaft which checks if he is below surface and yet high above terrain (sea bed)

prob not useful for you but thought id share it - we use it to animate trim-vanes on swimming apc's etc

_playerisswimming = ((getPosASL _player select 2 <1) and (getPosATL _player select 2 >2));

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×