Jump to content
Sign in to follow this  
Eclipse4349

Using "defend" function, AI not manning static weapons after being in a vehicle

Recommended Posts

Confirmed this after many rounds of tweaking and testing:

If an AI squad get's in a vehicle, then exits the vehicle and is then told to defend a position using the defend function, they will never man static weapons. If they proceed to the area on foot, they will man static weapons every time.

Anyone know a way around this?

Share this post


Link to post
Share on other sites

how did you confirm this exactly, what commands where involved.

did you use unassignVehicle on the unit after exiting the vehicle and did you assign them to the static weapons after done that ? did you order then to get in by using orderGetIn true ? etc etc.

if youre the commander of the squad see if you can mont them by using the order menu. ex. F2 -> 4 -> vehicle -> gunner

something like that. its been a while since i played arma. but you'll find it in the menu somewhere,.

Edited by nuxil

Share this post


Link to post
Share on other sites

These are AI squads for a two-town Warfare (CTI)mission I am almost finished with. I am using the Function module, placed on the map, not grouped or linked to anything. I have a static MG and AT behind some sandbags. And also tried without the sandbags. At the waypoint near the static weapons, I used the following code in the on activation field:

[group this, position this] call BIS_fnc_taskDefend;

This causes the infantry group to proceed to the area where the static weapons are, then some sit, others stand or patrol around, and someone man's each static weapon.

However, if I transport the infantry there in a vehicle of any kind, they will proceed to the area where the weapons are, sit/stand/patrol around, but will not ever man the weapons. I have tried countless combinations of weapons and locations to rule out any odd behavior. I used a "get in nearest" waypoint, synced with a "load" waypoint on the transport vehicle. I then have the transport moving to the location with a "transport unload" waypoint, and the infantry squads next waypoint is a "move" near the weapons, with the defend function code above pasted in the on activation field. I have tried various ways of adjusting the waypoints, and I have tried using a vehicle both grouped and upgrouped to the infantry squad, empty and already crewed with a driver. Nothing works except moving the infantry there on foot. Otherwise, they simply will not use the static weapons when they get there and start defending.

Luckily, I could adjust starting locations to give the Opfor time to reach the defenses on foot. All I have left is some tweaking for balance so Blufor doesnt roll in so easily, and the mission is ready to be copied to other towns :)

Edited by Eclipse4349

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  

×