ChaosDuck

[RELEASE] Autopilot / loiter script

4 posts in this topic

I was looking around for an autopilot script but didn't find anything that would work on my server (only one i found would freeze my plane mid air for some reason) so i decided to learn how create some basic arma scripts and gui, this basically gives you a scroll wheel option to get the hud out and you mark a place on the map and select the radius,height and side then it will spawn an ai and place him in the pilot seat and take over the flying.

you can download it here https://github.com/dulanw/A3AutoPilotScript

remember to change MINIMUM_SPEED andMINIMUM_HEIGHT_ASL in the config file since i set those to 0 and set DEBUG_MARKERS to 0 otherwise its going to create a bunch of markers.


This is my first script that i've made in arma so I don't know if there will be any problems with it if you use it in a plane with more players since i only managed to test it out with 1 other player inside the plane at the same time, please tell me in the comments below if there are any problems.

also plan on adding some other features like deploying flares since right now the ai only deploy flares once and doesn't manage to evade rockets.

*edit* forgot to mention there is bug where you can't switch seats if you turn on autopilot from the pilot seat, so if possible then switch to the co-pilot seat and take control or fly really high before switching to any other gunner seat

*edit* had some problems with the ai not using flares when targeted by rockets so you can use this https://github.com/dulanw/A3WarningScript  to display a warning to the gunner.
also added an option to limit the speed of the vehicle, so that ai doesn't try to fly into the way-points at 600km/h and can't turn in time for the next one

Edited by ChaosDuck
  • Like 4
  • Thanks 1

Share this post


Link to post
Share on other sites
Advertisement

i followed your installtion. but i did not get a scroll wheel option  in game .

and the following is my installtion

class RscTitles
{
        
#include "custom\PilotHUD\dialog.hpp"
#include "dialog\TUT_gui_veh.hpp"
#include "ExAdClient\RscTitles.cpp"
#include "custom\MWarning\dialog.hpp"
};

image.thumb.png.41f466bdb2e57c6172da2e20d2c47ada.png

Share this post


Link to post
Share on other sites
11 hours ago, 厉害救济 said:

i followed your installtion. but i did not get a scroll wheel option  in game .

and the following is my installtion

class RscTitles
{
        
#include "custom\PilotHUD\dialog.hpp"
#include "dialog\TUT_gui_veh.hpp"
#include "ExAdClient\RscTitles.cpp"
#include "custom\MWarning\dialog.hpp"
};

image.thumb.png.41f466bdb2e57c6172da2e20d2c47ada.png

MWarning and PilotHUD are my other 2 scripts.
In your description.ext you need to have

#include "custom\ChaosAutoPilot\Dialog\defines.hpp"
#include "custom\ChaosAutoPilot\Dialog\dialogs.hpp"

class cfgFunctions
{
    #include "custom\ChaosAutoPilot\functions.hpp"
};

and in your initLocalPlayer.sqf you need to have

call ChaosPilot_fnc_Init;

these will add the autopilot, also sorry for the late reply.

Edited by ChaosDuck

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.