Jump to content

Recommended Posts

  Hi Guys,

This time I am releasing a script not for the benefit of mission makers but for players. It is working like the "Pitch Altitude Hold" setup which can be found for instance by F-16s (can be seen below "F-16 Autopilot Controls").
Basically it is fixing the altitude when it is turned on but still let's you to adjust speed, do pitch, yaw and roll.

In addition to that Loiter (Pylon Turn) has been also added to the script.

 

Mod version of this script can be found here.

 

                                    Autopilot

 

 

                    Altitude Fix Demonstration

 

Spoiler

 

 

         

                    Loiter (Pylon Turn) Demonstration

 

Spoiler

 

     

                    Helicopter Demonstration

 

Spoiler

 

             

                        F-16 Autopilot Controls

 

Spoiler

ta28n9.jpg

 

Features

 

  • Fixes the altitude to the sea level altitude when the autopilot is activated (will be referred as initial altitude)
  • Gives possibility to pilot to adjust speed, pitch, yaw and roll angles while autopilot is open. Autopilot returns fixed-wing airplanes to initial altitude after control is released back
  • Autopilot/Loiter automatically turns off when
    • Speed below minimum speed based on landing speed. In case of helicopters minimum speed is 40 kmh
    • Speed above 0.9 Mach
    • Engine is damaged
    • Roll angle is above maximums 35° (only for helicopters)
    • Pitch angle is above maximums which is 25° for helicopters and 50° for fixed-wings
    • Rudder control (only by helicopters)
  • Gives autopilot functionality to every air vehicle at mission start automatically
  • Gives loiter (Pylon Turn) functionality to every fixed-wing at mission start automatically
  • Autopilot and Loiter cannot be turned on at the same time
  • Only pilot can turn it on/off. If co-pilot takes control, he/she is able to use the autopilot as well
  • For spawned airplanes and helicopters autopilot functionality should be given via following command
     [this] spawn DEVAS_AutoPilot;

     

  • For spawned airplanes loiter functionality should be given via following command

  • [this] spawn DEVAS_Loiter;

 

Future Plans

 

  • Other autopilot setups by fighter jets, i.e. fix attitute
  • GUI
  • Adjustable loiter parameters

 

Download

 

 

Sample Mission

 

 

Usage

 

  • Details are given in readMe.txt inside the zip. Sample mission can be found above.

 

Version History

 

v.2.0

 

  • Added: Loiter functionality to airplanes
  • Added: Speed fix for helicopters
  • Added: Pitch will be adjusted to -5° by helicopters automatically
  • Tweaked: Pitch limit by helicopters is increased to 25°
  • Tweaked: +-10° is the band where helicopters are fixing their speed. Pitch angles outside of this band can be used to alter speed
  • Added: Rudder will turn off autopilot by helicopters

 

v.1.7

 

  • Added: Co-Pilots can enable the autopilot if they take the control
  • Added: Switch sound when autopilot is engaged or disengaged
  • Tweaked: Give more freedom to adjust the speed of helicopters when autopilot is on

 

v.1.6

 

  • Added: Roll and pitch angle limits
  • Added: Maximum speed limit
  • Tweaked: Minimum speed to turn on the autopilot is increased to 40 kmh in case their landing speed is below that (i.e. helicopters)
  • Tweaked: From now on it will not fix the pitch to 0° but also will keep the initial altitude, this means if you climb or dive while autopilot is on with a fixed-wing aircraft after you release the controls it will take you back to initial altitude
  • Fixed: Helicopters will not be able to fly upside down anymore

 

v.1.5

 

  • Added: Autopilot functionality for helicopters
  • Tweaked: Autopilot will turn off if engine is stopped and will not show up before engine starts
  • Fixed: It will not disappear from action menu after take off for some planes

 

v.1.1

 

  • Fixed: Autopilot not showing in some airplanes
  • Tweaked: Minimum speed of automatic turn off set based on landing speed of airplane

 

v.1.0

 

  • Initial version

 

Special Thanks

  • Chronicsilence for his matrix function library

 

Enjoy!

 

  • Like 10

Share this post


Link to post
Share on other sites

Any chance this can be adapted to the helicopters in the game? Change "Plane" to "Helicopter" or "Air".

Would using isKindOf be better?

{[_x] spawn DEVAS_AutoPilotEnable;} foreach (entities [["Plane"], [], false, true]);

 

I see you chose 160 as the min speed, do you have issue with lowering that, say for the small Caesar BTT plane use to 110?

 

landingSpeed

Advised landing speed for AI and autopilot. 

Float 

landingSpeed = 195;	// A-164 Wipeout
landingSpeed = 110;	// Caesar BTT
landingSpeed = 230;	// V-44 Blackfish

 

Awesome script, none the less. I flew around for an hour using this in the Wipeout.

I am a scripting noob and mean no disrespect with my suggestions, just trying to learn and understand why some scripter use different scripting, especially when multiple ways of doing the same thing exist.

 

Sincerely Nice job,

Reed

  • Like 1

Share this post


Link to post
Share on other sites

WOW.  really must have for all jets. Downloading script now to try.  Waiting for mod version:smile_o:

 

edit

I have a 10-15 mods installed and it seems they conflict with your script. No autopilot action menu for me. Will make more tests with vanilla rma today

 

edit edit

I just test it only with fir F16 and CBA.  Not working. Can you upload a simple demo mission ?

  • Like 1

Share this post


Link to post
Share on other sites

Looks interesting,  Will be following your Thread, thanks

 

Shrike

 

 

 

111_SOG_Shrike_Signature.png

Share this post


Link to post
Share on other sites

v.1.1 uploaded 

  • Fixed: Autopilot not showing in some airplanes
  • Tweaked: Minimum speed of automatic turn off set based on landing speed of airplane
17 hours ago, Jnr4817 said:

Any chance this can be adapted to the helicopters in the game? Change "Plane" to "Helicopter" or "Air".

Would using isKindOf be better

 

 

I don't see how it will benefit the helicopters actually. Normally I use hover there if I want to look around. Do you really beleive it will have benefits?
iskindof returns the classname of a given unit. 
Entities is returning all objects which are airplane (based on the filter which I passed).

 

p.s. I add sample mission

 

  • Like 1

Share this post


Link to post
Share on other sites
1 minute ago, Devastator_cm said:

v.1.1 uploaded 

  • Fixed: Autopilot not showing in some airplanes
  • Tweaked: Minimum speed of automatic turn off set based on landing speed of airplane

 

I don't see how it will benefit the helicopters actually. Normally I use hover there if I want to look around. Do you really beleive it will have benefits?
iskindof returns the classname of a given unit. 
Entities is returning all objects which are airplane.

 

Excellent, thanks for the knowledge on isKindOf.

 

Since this is really a pitch control instead of autopilot. Having this ability in a helicopter would allow for steadier flight in the AFM when traveling at cruise speeds and low to the ground. It may just be, but in the AFM with autohover on the controls are very diminished. Your AutoPilot in the helo would allow finer control while maintaining a constant pitch.

 

Thanks for considering my request.

 

 

Share this post


Link to post
Share on other sites

Shrike also want to use it with helicopters. I will wait his feedback with modified version of script and based on that I can release official version which includes helicopters.

And I am open to any nice requests as usual :)

Share this post


Link to post
Share on other sites

Excellent.

Can't wait to try.

Thanks again for a great script.

 

Did some more testing.

In the Caesar and Caesar BTT the AutoPilot On disappears from the action menu once you take off and leave the ground.

 

Also, regardless of turning On or Off, the AutoPilot always says On or on in the action menu. Could be confusing to some.

 

Humbly,

Reed

  • Like 1

Share this post


Link to post
Share on other sites

Man , you Really did jets Great Again!

 

ideas 

mod version

CBA key support

  • Like 1

Share this post


Link to post
Share on other sites

Good work you can make from the script a mod
And would it be possible to add autopilot where you can fly in a circle?

Share this post


Link to post
Share on other sites
2 hours ago, GamerOnkel said:

Good work you can make from the script a mod
And would it be possible to add autopilot where you can fly in a circle?

 

19 hours ago, sammael said:

Man , you Really did jets Great Again!

 

ideas 

mod version

CBA key support

 

 

Guyssss please tell me why you want it as mod :)
I thought everybody would be glad if I do my stuff as scripts because they can simply use them in their servers without asking people to install them :)
But now because both of you asks MOD version I would like to know the reason. Maybe I am missing a point :(

 

@GamerOnkel

Circle flight path is also what I was thinking to do. I see the necessity by USAF Mod's AC-130. Basically for that I might need a small GUI to let user enter a radius or pitch angle.
As usual I do my software releases in iterative cycles instead of big bangs, so I might release an initial version with hardcoded radius and meanwhile I can study how to implement GUIs in Arma 3 to improve the functionality :)

  • Like 2

Share this post


Link to post
Share on other sites
12 minutes ago, Devastator_cm said:


But now because both of you asks MOD version I would like to know the reason. Maybe I am missing a point :(

 

I want to play cool missions from SW on jets without unpbo someone mission and implementing autopilot script version

Share this post


Link to post
Share on other sites

Also play in EDEN   own super simple missions)

Share this post


Link to post
Share on other sites

Its way more easy to use and will Spread much better in the Community because its simple and Fast usable w/o preparing a Special mission.

  • Like 1

Share this post


Link to post
Share on other sites
On 08/03/2017 at 10:05 AM, sammael said:

Waiting for mod version:smile_o:

Yes please.  CBA as a requirement is totally acceptible if necessary.

 

Circle path would be VERY welcome as well.  So the mod version (see what I did there .... subtle influencing) detects a deliberate bank and keeps that bank and autolevel when you turn on the autopilot!

Share this post


Link to post
Share on other sites
20 hours ago, Jnr4817 said:

Excellent.

Can't wait to try.

Thanks again for a great script.

 

Did some more testing.

In the Caesar and Caesar BTT the AutoPilot On disappears from the action menu once you take off and leave the ground.

 

Also, regardless of turning On or Off, the AutoPilot always says On or on in the action menu. Could be confusing to some.

 

Humbly,

Reed

which version you tried? 1.1. or 1.0?

Share this post


Link to post
Share on other sites

I tried 1.1

 

I'd prefer to keep it a script if that's possible.

Share this post


Link to post
Share on other sites

Can you send me your mission? The issue which you described was happening in 1.0 but should not happen in 1.1.

 

I will keep script version even if I release a mod version. I will use myself the script mission in my missions :)

  • Like 2

Share this post


Link to post
Share on other sites

v.1.5 released

it will fix the issue with Caesar BTT. It is now working by helicopters as well. Autopilot will not show up if engine is off and it will turn off if engine is turned off.


In order to have JIP compability the initialization should be called from initPlayerLocal.sqf instead of init.sqf. I adjusted read me based on that.

  • Like 1

Share this post


Link to post
Share on other sites

Is it normal- sometimes autpilot turn off automatic? -for example when I have vertical angle 35* for 1-2 seconds or when I go in virtual targeting pod view

edit -engine on and speed more than 400km/h

Share this post


Link to post
Share on other sites

if you have too high or low angle it can happen. Reason is, it tries to come back to 0 as fast as possible and in such cases drops the speed dramatically which turns off the autopilot.

even a speed drop below landing speed for a milisecond will cause turn off

  • Like 1

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

×