Jump to content
John Douglas

Make AI unit deploy static weapons?

Recommended Posts

I'm interested in writing a script to have AI soldiers deeploy a MG for ArmA2 OA + ACE add ons.
I've labelled two of the three RU soldiers "KORD_Gunner" & "KORD_Tripod". The third soldier being the ammo bearer, and for sake of this exercise have Not considered as relevant in script .

 

I've moved my original post from there to here, of which I've based my code from killzone_kid, substituting in my relevant unit names.

Having checked and tested the class names, I am aware of the flowing:

 

- KORD_Tripod carries the "ACE_6T7TripodProxy".
- KORD_Gunner carries the "ACE_KORDProxy" as tested in the code below.

KORD_Tripod action ["dropWeapon", KORD_Tripod, "ACE_6T7TripodProxy"];
KORD_Gunner action ["dropWeapon", KORD_Gunner, "ACE_KORDProxy"];

 

 

KORD_Gunner addEventHandler ["WeaponAssembled", 
{
	_this select 0 action ["GetInGunner", _this select 1];
}]; 
_base = unitBackpack KORD_Tripod; // "ACE_6T7TripodProxy"; // _base = unitBackpack KORD_Tripod; 
KORD_Tripod action ["PutBag"];
KORD_Gunner action ["Assemble", _base]; 

 

At the understanding that the addEventHandler is executed after tripod assembly and appears to use 'target data' supplied from "_this select 0" and "_this select 1" statements, possibly from an 'addaction' command. I've omitted this for testing purposes.

Having just attempted a manual assembly of the tripod, I've concentrated on just achieving the tripod assembly using:

 

_base = "ACE_6T7TripodProxy"; // and have also tried_base = unitBackpack KORD_Tripod; 
KORD_Tripod action ["Assemble", _base];  

. . . . . With no success.

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

×