Jump to content
Sign in to follow this  
redarmy

"Commandgetout help"

Recommended Posts

Im trying to make it so that a group (better if ANY group) that is embarked as passengers in the player helo,disembark when the helo is touching ground,and run a CBA patrol script.

 

I have it working to a degree but squads are automatically reentering the helo after exiting

 

commandGetOut units grp1; [grp1] orderGetIn false; [grp1, "pat1"] call CBA_fnc_taskSearchArea; hint "working"

in example above iv also added an order get in false but its not helping. I think by making the false an array of unit names instead of "grp1" might help but that wont be useful to me as the units respawn and i do this insertion again later when their names wont be remembered(group variable will be)

 

so is there an easier way for me to eject all non grouped AI that are in my helo when im in a trigger area?  

 

EDIT : Also for this example the Helo can NOT have any variable name,it will be a spawnable vehicle so this has to be dynamicly done in some way

Also i can only work from group names. anything needing an array of individual unit names will not work in this case

 

"order get in" , "leave vehicle"and "allow get in" all require an array of unit names.is there any way to alter that syntax so i can just acount for all the units in grp1 without needing an array?

Share this post


Link to post
Share on other sites

This will get you started (on a trigger),

You'll need an additional condition (e.g distance to LZ: (vehicle player) distance (getMarkerPos "pat1") < 100) so it won't activate on takeoff.

//Condition:
isTouchingGround (vehicle player)

//On activation:
commandGetOut units grp1;
{
  unassignVehicle _x;
  [_x] orderGetIn false;
}forEach units grp1;
grp1 leaveVehicle (vehicle player);
[grp1, "pat1"] call CBA_fnc_taskSearchArea;
hint "working";
  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
6 minutes ago, RCA3 said:

This will get you started (on a trigger),

You'll need an additional condition (e.g distance to LZ: (vehicle player) distance (getMarkerPos "pat1") < 100) so it won't activate on takeoff.


//Condition:
isTouchingGround (vehicle player)

//On activation:
commandGetOut units grp1;
{
  unassignVehicle _x;
  [_x] orderGetIn false;
}forEach units grp1;
grp1 leaveVehicle (vehicle player);
[grp1, "pat1"] call CBA_fnc_taskSearchArea;
hint "working";

your an absolute legend. This works flawlessly. Mate i had been trying to figure this out for a long time looking for unnasign/vehicle player syntax' etc and never could put it together. Much appreciated

  • Like 2

Share this post


Link to post
Share on other sites

No problem, i'm glad it worked.

 

On 5/11/2022 at 5:44 AM, redarmy said:

i had been trying to figure this out for a long time looking for unnasign/vehicle player syntax' etc

I wasted a lot of time back in the day to find that out too.

It sucks the AI needs so many commands to abandon the vehicle, but that's that.

  • Like 1

Share this post


Link to post
Share on other sites
On 5/12/2022 at 2:34 AM, RCA3 said:

No problem, i'm glad it worked.

 

I wasted a lot of time back in the day to find that out too.

It sucks the AI needs to so many commands to abandon the vehicle, but that's that.

Yeah i hear ya,AI need commands to do pretty much anything reflecting real life like actions if you think about it.

Yeah as the pilot,you should have say in dismounting full stop. Then theres "mechanized infantry".dont get me started,trying to do anything with a group of men with a vehicle in it is impossible.

 

friendly road kills...vehicle driving too far ahead...groups literally "degrouping" if certain events happen like 90% of the time...AI exit vehicle under fire(great) but proceed to bunch up at vehicle rear and prone,all die when vehicle is inevitably hit by missile.

 

My only wish for Arma4 is that BIS get right,their actual aim of the series...combined arms. And tighten up formation on the entire premise to where there is actual scripted AI(no linear as they typically are in sandbox envoirnment) when it comes to both entering buildings,awarness of vehicles/groups outside vehicle,and facing toward armor(leaving a dangerous ariel zone if AA present and they are flying). BASICS are really those things and should have been ironed out in Arma3.

  • 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
Sign in to follow this  

×