gc8 970 Posted October 10, 2018 Hello what is the best way to make AI in group to face certain direction? simply setdir does not work as the AI turns back to where it was facing. thx! Share this post Link to post Share on other sites
Janez 507 Posted October 10, 2018 Yeah, I noticed some interesting behaviour with groups. I haven't found a reliable to keep them in place and not turn immediately on mission preview, other then disableAI "MOVE". However that, naturally, also prevents them from engaging anything outside los. BIS_fnc_ambientAnimCombat, STAND_IA is pretty much default standing anim iirc. So one can, for example, combine this disableAI "PATH"; and [this, "STAND_IA", "ASIS"] call BIS_fnc_ambientAnimCombat; to keep them in place, make them face desired direction and react to combat. EDIT: actually, disableAI may not even be necessary if you use BIS_fnc_ambientAnimCombat. So, maybe something like: {if (local _x) then {[_x, "STAND_IA", "ASIS"] call BIS_fnc_ambientAnimCombat};} forEach (units (group this)); 1 Share this post Link to post Share on other sites
Rydygier 1302 Posted October 10, 2018 setFormDir perhaps. It should change facing direction for whole group. If only one AI should change direction, I would try temporary removing him from the group. Share this post Link to post Share on other sites
gc8 970 Posted October 10, 2018 @Janez Although that's unusual code it seems to work perfectly, thanks! @Rydygier Tried that one already Share this post Link to post Share on other sites
phronk 895 Posted October 10, 2018 To add onto this post, an easier alternative is to have the unit do the following: _unit doWatch _obj; // (or _pos) //Sometimes this encourages the unit to doWatch _unit doFire _obj; Share this post Link to post Share on other sites