Hello everyone, I'm new here, so this is probably one of those cases where I am about to make an absolute newbie error. Anyway, I'm from a general gaming group of friends in the netherlands, who loosely refer to themselves as Leiden-3e.
I only recently became familiar with the existence of OFP, but... it's definitely great. I have just gotten started with a little bit of scripting, and I made a script, my first one, which is attached below.
Now, I play a bunch of online multiplayer games with a few friends. One of those friends consistently crashes every single helicopter available too him. He flies into trees and whatnot, easily going through 5 or 6 in a base respawn mission. We affectionately refer to him as "Addy" which is why the script is called "saveaddy.sqs"...
Now, as my first scripting experiement I wrote a little terrain avoidance script. It evaluates two main things.
1. When the chopper gets below a certain altitude, it checks the vertical velocity, and if this is going down too fast, it reverses it to the same value, but then positive.
2. When the chopper gets below a certain altitude, it checks the forward speed, and if this is too high, it sets the vertical velocity to positive, regardless of what it was. This is to stop people crashing because their forward speed is too high.
I've tested it, and it seems to work fine. We are going to initialise his chopper in the next mission, without telling him and see if he stays alive longer :-).
Anyway, OFP is a great game, and I hope that I will slowly learn more about scripting, and be able to make a real contribution. I have attached the script, if someone knows how to submit it... please do so :-)
Sans-pareil