RCA3 593 Posted February 5, 2020 Here's a workaround for making AI lower their weapons and keep formation: Select all your units. Set them to UP (standing). Select all your units again and set them to SAFE. Select all your units again and set them to AWARE. Your AI units will walk with lowered weapon on selected formation. 3 Share this post Link to post Share on other sites
xBloodshed 11 Posted November 18, 2020 OMG. thanks a bunch! Any idea why this hack to get it working like that? How to get editor placed units to do the same? 1 Share this post Link to post Share on other sites
RCA3 593 Posted November 20, 2020 (edited) My idea here is that there's something telling the AI that Automatic Stance is NOT Standing (which while Aware, it is 😐) so we got to force Standing first for the engine to know. This seems to be working. Enjoy 😉. On the group's Init field: Option 1 Works only once until AI changes behaviour. null = this spawn{ _this setBehaviour "SAFE"; { _x setUnitPos "UP"; waitUntil {(unitPos _x) isEqualTo "Up"}; }forEach units _this; { waitUntil {weaponLowered _x}; }forEach units _this; _this setBehaviour "AWARE"; waitUntil {!(behaviour (leader _this) isEqualTo "AWARE") || (units _this findIf {alive _x} isEqualTo -1)}; { _x setUnitPos "AUTO"; }forEach units _this; }; Option 2 Permanent throughout the mission: Note that AI will stay in forced "AWARE" mode after contact, preventing the code to activate "SAFE" mode (lowering the weapons), at ~5 minutes mark they'll lower rifles again. TAG_arr_rasanims = ["amovpercmwlksraswrfldf", "amovpercmwlksraswrfldf_ver2", "amovpercmrunsraswrfldf", "amovpercmrunsraswrfldf_ldst"]; TAG_arr_lowbehaviour = ["AWARE", "CARELESS"]; { if !(isPlayer _x) then{ _x addEventHandler ["AnimChanged", { params ["_unit", "_anim"]; if (_anim in TAG_arr_rasanims) then{ if !(behaviour _unit in TAG_arr_lowbehaviour) exitWith{_unit setUnitPos "AUTO"}; if (_unit getVariable ["ai_walk_lowered", false]) exitWith{}; _unit setVariable ["ai_walk_lowered", true]; _unit spawn{ _this setBehaviour "SAFE"; _this setUnitPos "UP"; waitUntil {sleep 0.1; weaponLowered _this || {_this distance (formationPosition _this) > 5} || {!(alive _this)}}; _this setBehaviour "AWARE"; _this setVariable ["ai_walk_lowered", false]; }; }; }]; }; }forEach units this; (Moderators you might want to move this to Editing & Scripting, Idk, it's up to you. Thanks). Edited February 4, 2021 by RCA3 Changed code (weaponLowered). Added Option 2. Share this post Link to post Share on other sites