Jump to content
Sign in to follow this  
fredkatz

AI Heli Control 1.0

Recommended Posts

Hi

I have been browsing these forums for some time seeing all of the great addons that this community has created and I would like to add another one

AI Heli Control 1.3

After I started playing ArmA 2, I love to fly helicopters and airplanes and was impressed that the AI could land helicopters anywhere, but there were no commands to allow landing other than disembarking the pilot and then the AI would land it in the worst possible location, so I wrote this script system.

Adds some Actions to the menu of the heli to command landing and pickup, also features a LZ system

Images

-------

Required Addons

----------------

CBA - Extended Eventhandlers

Optional Addons

---------------

MP Compatible Fast Rope Addon

Features

--------

Ability to create a LZ for the helicopter

Commands to land the helicopter

Commands to fly at different heights

if the MP Compatible Fast Rope Addon is installed

you can command a ai pilot to fastrope infantry anywhere on the map

Download

---------

The link below has both 1.3 and the now old 1.2 version available

AI Heli Extras

I hope it makes controlling AI Transport helicopters easier! :D

Edited by fredkatz
Version 1.3 Released!

Share this post


Link to post
Share on other sites

Right just tried this and I am impressed.

Few things that I found, in no particular order (and will continue to add as I test further)

1) If the LZ is over about 100m the AI will choose a more local LZ (and ignore your one)

2) Once you have landed, a take off action would be great !

3) As the gunner issuing MOVE commands would be great !

4) I recommend ONLY having the actionmenu when inside the helo, as being outside spawns TWO copies of action menu.

5) If you have carried out a combat insertion (and you have landed), then you need a TAKEOFF action again, as sending them to 25m they say ('decreasing altitude to 25m'!)

6) If pilot is in a MOVE, he will wait until that is complete before executing your command.

7) If pilot (or more importantly not NEAR any helicopters), remove all actions :)

STILL TESTING ...... impressed! Will post more as I come to it.

PS IDEA ... micromanaging forward, back, left, right movement would be amazing :)

Edited by Kremator

Share this post


Link to post
Share on other sites

This is great!

I'm currently testing without the fast rope installed.

An 'Engine start' and then a 'Dust Off' command would certainly be good, so as to have the chopper wait on the ground until told, rather than having to create a move order to start up.

Can't really tell the difference between the various landing systems, the chopper tends to turn in the air when landing in all instances whereas a combat landing to me is a very fast touch down then off either in a straight line or at least with a particular direction in mind.

Hopefully this sounded constructive as it really is a great addon thus far!

Also wanted to add changing the LZ object to an invisible LZ, though it's probably useful for debuging.

E

Edited by Electricleash
additions

Share this post


Link to post
Share on other sites

Hey fredkatz,

Thanks a lot for this, I am testing it with fast-roping out of an AI-driven helicopter in CLAfghan and this is really useful.

Small suggestion: only show the fast-roping actions if you detect Norrin's pbo loaded, like:

if (isClass (configFile >> "CfgPatches" >> "norrn_dbo_fastrope")) then {
< show fast-roping actions >
};

I'm using it with ACE fast-roping actually (after I tricked the component for my mission to allow anyone to deploy the rope).

Also a question: what's your policy about embedding your scripts into a mission directly to avoid creating an addon dependency ? I tested this and it was really easy to integrate. If you support this method, I can provide the quick howto.

Share this post


Link to post
Share on other sites

Hello Sir,

Absolutely stellar mod. Could I ask for yet another feature?

The ability to further control the Helo AI like we do with ground-based vehicles, such as Move Forward, Left, Right, Fast, Reverse.

Is that doable?

If so, that would be a fantastic breakthrough in ARMA.

Thanks again for a great addon!!! :):):)

Best regards!!!

Share this post


Link to post
Share on other sites

Hi im using latest ACE 1.13 with hotfix and also CO 1.60 + latest beta, I have installed this mod, and all the options show in menu for helis, bit no matter what I do nothing happens. I placed a marker on map, then tried combat insert ... nothing, AI doesn't start engine and nothing occurs.

Tried little bird, huey, even ah64 as gunner for fun, but nothing happens. Wondering what would be the conditions for this not to work?

I tried with AI pilot heli's, empty helis and me placing one of my team as pilot and as passenger, and nothing ... chin stroke session for me :) I will test a bit more and see what's making it fail at the moment.

I am right in thinking I place a AI heli vehicle on the map, jump in the back, place an insertion marker through menu, then select a insertion type and then pilot should start up and then fly to location, right?

Edited by mrcash2009

Share this post


Link to post
Share on other sites

You still need to issue the pilot a move order as usual.

Share this post


Link to post
Share on other sites

But to move I would click map, which then im unsure why I would place a marker?

Also, how would I issue a move if its not a pilot under my team control?

Sorry I must be having a dumb ass moment, but I cant see whats what here :)

Share this post


Link to post
Share on other sites
But to move I would click map, which then im unsure why I would place a marker?

Also, how would I issue a move if its not a pilot under my team control?

Sorry I must be having a dumb ass moment, but I cant see whats what here :)

The scripts seem to be made for AI pilot under direct player's control.

The "create LZ" action simply makes a helipad which is helping AI land precisely at that spot when you are ordering a land/insertion/pickup within 500m of it.

What's nice is that you can send all those orders to the pilot even when you're not in the helicopter, using the action menus (select pilot - 6) so you can have them come to you, pick a good LZ yourself and order them to land there without having them to dismount.

Edited by Robalo

Share this post


Link to post
Share on other sites

I have newest ACE and 1.6 installed and I don't get a menu. I have all of the requirements any ideas about what's wrong?

Share this post


Link to post
Share on other sites

@Robalo

I have no problem with a script version that is stand alone and thanks for the idea to check for the fast rope addon, will add that for the next release

@Kremator

I have never had a problem with multiple action menus :confused:

As for the take-off command, that could be added for the next version

I don't know if you can command AI pilots to move short distances in any direction, I have had problems to make the heli move any distance less than 100m

@Electricleash

The start engine and dust-off commands would be very useful I will see if I can add them in for the next release

The landing methods are the default ones included with heli scripting,

  • Land - Lands the heli and turns off the engine
  • Combat Insertion - Lands the heli and leaves the engine on (Might need to be changed?)
  • Combat Pickup - Is sometimes strange, sometimes it lands, sometimes it hovers (Probably needs to be changed too)

I guess I left the visible helipad in there, it is a useful debug tool, but need to become a invisible helipad for the next release

@trini scourge

Some helicopters might not be supported at the moment, I have ace and will add any missing helicopters for the next release

Share this post


Link to post
Share on other sites

Im still unsure how im managing to be confused about this addon but here goes:

I have AI to fly that can only be under my command (to tell them to move) ... I then point click on map to tell them to move, as we are flying do I THEN place a marker and select the landing options?

Becuase I was placing the marker first, then getting heli to take off, then while flying selected to land, heli would go to near the marker, then turn around go all the way back to where we started and only at that stage initiate/acknowledge landing and land where I began ... so is it me doing things in the wrong order or a bug?

Share this post


Link to post
Share on other sites

What a great addon! I second Robalo's request for a script version though. I could hack and slash myself, but something official would be better.

You may have been lurking on the forums for a long time - if so, what a great way to crash the party!!! Nice one!

EDIT --->

It would also be great if the helicopters could be defined in a userconfig file. That way even in addon form, it would be simple to add new helicopters.

Edited by Jedra

Share this post


Link to post
Share on other sites
Im still unsure how im managing to be confused about this addon but here goes:

I have AI to fly that can only be under my command (to tell them to move) ... I then point click on map to tell them to move, as we are flying do I THEN place a marker and select the landing options?

Becuase I was placing the marker first, then getting heli to take off, then while flying selected to land, heli would go to near the marker, then turn around go all the way back to where we started and only at that stage initiate/acknowledge landing and land where I began ... so is it me doing things in the wrong order or a bug?

On the 3 landing options, there is a waitUntil the helicopter is ready for another command, It could be the problem but I have not had this problem of the AI pilot flying back to the starting point and then landing.

It does not matter when you place the LZ, I have tried it before and after taking off and had no problems, but it does help to let the helicopter reach its destination before activating a landing command

Share this post


Link to post
Share on other sites
It would also be great if the helicopters could be defined in a userconfig file. That way even in addon form, it would be simple to add new helicopters.
I second this, a userconfig with an array to simply add new classes would be a welcome addition for the add-on version. Also opens options to maybe have certain features on or off, and certain vehicles you dont want attached.

Further to enhancement, is there any way that the menu could be put into a dialogue pop up rather than user menu? Something like how ACE does it.

If it does stay in the menu Id like to suggest a script to look at that has a better open/close feature in the menu. When you open the menu it scrolls open the options and you dont have to re-enter the menu again to see the contents (like you have now):

http://www.armaholic.com/page.php?id=7197

This is a dynamic menu like yours that activates secop missions, but, check out how the menu opens & closes, maybe yours could have this so you dont have to exit/re enter menu to see the open menu options.

Just some enhancement suggestions :)

Edited by mrcash2009

Share this post


Link to post
Share on other sites

Script version quick howto:

1. Unpbo the addon.

2. Copy the extracted content into your mission (the heli_extras folder).

3. Add this to your mission's description.ext:

class Extended_InitPost_Eventhandlers {
class Helicopter {
	heli_extras_Init_tn = "_this execVM 'heli_extras\heli_extras_init.sqf'";
};
};

Note: CBA is still required.

---------- Post added at 21:18 ---------- Previous post was at 20:30 ----------

About better supporting mod helicopters, you could rely on the config and auto-detect transport helis based on their transportSoldier value and gunships based on how threatening they are to armor. Here's my alternate heli_extras_init.sqf code with this autodetection:

//set private variables
private ["_heli","_istransport","_isgunship","_isuav","_debug"];

_debug = true;

//get heli
_heli = _this select 0;
#define __cfgheli configFile >> "CfgVehicles" >> typeOf _heli

_istransport = false;
_isgunship = false;
_isuav = false;

if ([__cfgheli >> "transportSoldier", "number", 0] call CBA_fnc_getConfigEntry > 1) then { _istransport = true };
if (([__cfgheli >> "threat", "array", [0,0,0]] call CBA_fnc_getConfigEntry) select 1 > 0.25) then { _isgunship = true };
if ([__cfgheli >> "isuav", "number", 0] call CBA_fnc_getConfigEntry > 0) then { _isuav = true };

if (_isuav) exitWith {
if (_debug) then { diag_log format ["Heli %1 is a UAV",typeOf _heli] };
};

if (_istransport && _isgunship) then {

//Run Transport-gunship related scripts
[_heli] execVM "heli_extras\helicopter\heli_actions\trans_gunship_heli_deploy_lz_tn.sqf";
[_heli] execVM "heli_extras\helicopter\heli_actions\trans_gunship_heli_menu_close_tn.sqf";
if (_debug) then { diag_log format ["Heli %1 is a Transport-gunship",typeOf _heli] };

} else {

if (_istransport) then {
	//Run Transport chopper related scripts
	[_heli] execVM "heli_extras\helicopter\heli_actions\trans_heli_deploy_lz_tn.sqf";
	[_heli] execVM "heli_extras\helicopter\heli_actions\trans_heli_menu_close_tn.sqf";
	if (_debug) then { diag_log format ["Heli %1 is a Transport",typeOf _heli] };
};

if (_isgunship) then {
	//Run Gunship chopper related scripts
	[_heli] execVM "heli_extras\helicopter\heli_actions\gunship_heli_deploy_lz_tn.sqf";
	[_heli] execVM "heli_extras\helicopter\heli_actions\gunship_heli_menu_close_tn.sqf";
	if (_debug) then { diag_log format ["Heli %1 is a Gunship",typeOf _heli] };
};

};

Edited by Robalo

Share this post


Link to post
Share on other sites

@mrcash2009

I would love to create a dialog menu to control the heli instead of the action menu as it is now, I guess I will have to play around with dialogs

@Robalo

Thanks, I will use that in the next version

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  

×