Forum Jump :

Author Message


Posts: 131
Rank:


Level: Member

Country: us
Location:
Occupation:
Age: 25
In-game name: Joshua

 
#1 Posted at 2016-04-09 15:04        
     
I need a way to force vehicle crews to stay turned in when set to careless. I have a gorgon (AAF wheeled APC), that is moving to a friendly pinned squad. On the way, they are engaged and the commander overrides their waypoint, and orders the APC to a different location, if they are not set to careless. When they are set to careless, the commander pokes his head out and gets it shot off. :(

Is there a way to force them to stay turned in while in careless mode?


Author Message


Posts: 59
Rank:


Level: Member

Country: ca
Location: Quebec
Occupation:
Age:
In-game name:

 
#2 Posted at 2016-04-09 16:07        
     
There is an action command for that: LINK HERE
// unit action ["TurnIn", vehicle]
// unit action ["TurnOut", vehicle]
TankOne action ["TurnIn", TankOne];
player action ["TurnOut", vehicle player];

However, as stated in the link above:
AI will automatically turn in/out based on their current behaviour mode

The action command would need to be looped to keep the unit turned in...
For now, this is the only possibility i see. There is probably another way of doing it, I'm sure.


Advertisement


Author Message


Posts: 131
Rank:


Level: Member

Country: us
Location:
Occupation:
Age: 25
In-game name: Joshua

 
#3 Posted at 2016-04-09 16:21        
     
I just tried that and it spazed out the player camera (lots of flickering like the player was turning in and out from the cargo seat). (Probably what the action is referring to when it says animations get glitched when used on non crew members, however, I was using it only on the driver and commander.) I used splendid cam to see what was actually going on outside the vehicle, and the driver and gunner were turned out and not attempting to turn back in (even for a frame).

Here is my code:
onEachFrame {
    a3APC action ["LightOff", a3APC];
    a3APCC action ["TurnIn", a3APC];
    a3APCD action ["TurnIn", a3APC];
};

The apc is a3APC. a3APCC is the commander and a3APCD is the driver. I also am using an action to turn the apc's lights off so it doesn't paint a huge target on it's self. (The light code was preexisting and works properly.)

Just for reference, the player is in cargo on the APC (either the first or last slot, I'm not positive).

Thank you for the fast reply. Any ideas on how to tweak that, or any new ideas?


Author Message


Posts: 1589
Rank:


Level: Member

Country: pf
Location: Tahiti
Occupation: too many Arma
Age: 61
In-game name: Kobayashi Maru

 
#4 Posted at 2016-04-09 16:37        
     
Yes, same approach as yours right now. Action "turn in" is too "clever", like these for pilot and collision lights. I tried with disableAi FSM, raycasts, autoCombat...
In fact, I just tried the cocktail :
{_x disableAI "TARGET"} foreach crew APC; + autotarget + autocombat + FSM + cover + raycasts
It seems to work until the APC reaches the waypoint.

This post was edited by Pierre MGI (2016-04-09 16:44, ago)

PLEASE CONTACT ME ON BI FORUMS FOR ANY SCRIPT / MOD QUESTION. TKS

Author Message


Posts: 131
Rank:


Level: Member

Country: us
Location:
Occupation:
Age: 25
In-game name: Joshua

 
#5 Posted at 2016-04-09 17:51        
     
Maybe I don't quite follow Pierre, but I think you are saying that I should disable all AI traits but move.

I removed the turn in turnout code. Then, I disabled all AI except move on the commander (the commander is the one overriding the location of the move order), and the APC gets further, but the commander eventually overrides the location once an HMG starts engaging the APC.

I ran another test for the heck of it with move disabled as well and the AI commander was a lot better. Its not perfect but its tolerable.

Perhaps other solutions would be to make the commander ignore contact or to disable the commanders AI for navigating without waypoints. I have 3denEnhanced running, and I also cranked the commanders courage all the way up (in advanced AI), but this seems to have no effect.