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.

To be more specific:

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.

Edited by Eclipse4349

Share this post


Link to post
Share on other sites

Try: <group> leaveVehicle <vehicle> to remove the transport from ai group leader "awareness".

No idea if it will work but this is all I can come up with.

manipulating ai is really the most frustrating thing to manage in a mission :)

Share this post


Link to post
Share on other sites
ODEN;1816906']Try: <group> leaveVehicle <vehicle> to remove the transport from ai group leader "awareness".

No idea if it will work but this is all I can come up with.

manipulating ai is really the most frustrating thing to manage in a mission :)

Thanks for the suggestion. I'll give it a shot and add that to a waypoint before the one with the defend function attached to it.

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  

×