kupcho 19 Posted May 22, 2015 I have set up a small test mission where I'm giving several waypoints to a unit using the "random patrol" module. I can get the unit to go to the end point and even set their stance to my liking, but they always end up facing random directions. Is there any way to have a unit turn to face a specific direction when it reaches that end waypoint? Share this post Link to post Share on other sites
bull_a 44 Posted May 22, 2015 i guess you could do something like this in the waypoint onAct field you need to put _nul = [ ,direction to face] execvm "unitsfacedir.sqf";unitsFaceDir.sqf _units = _this select 0;_dir = _this select 1;_pos = [_unit,_dir,100] call bis_fnc_relpos;_units commandWatch _pos; Share this post Link to post Share on other sites
kupcho 19 Posted May 22, 2015 Thanks Bull_A. I haven't tried your solution (yet), but I continued messing around until I found something that seems to work okay; Place a waypoint with this in the “On Act†field; this setPosATL [14594.7,16754.9,3.72901]; this setunitpos "middle"; this commandWatch [14754.9,16510,1000]; In this example, as soon as the unit reaches the waypoint, this specific bit of script will place it on the SW roof section of the Main Airport Terminal. He will be crouching and watching 1000m above the taxiway to the SW of his position. Not ideal, but it gets the job done. I just wish that I could have him watch a general direction as opposed to a specific point. I consider this answered, but would like to hear any other workarounds folks may have. Thanks again for the quick reply. Share this post Link to post Share on other sites
Jona33 51 Posted May 22, 2015 You can use setFormDir <-- would need to be (group this) setFormDir 000 (obviously replacing 000 with whatever direction you need). https://community.bistudio.com/wiki/setFormDir Share this post Link to post Share on other sites
bull_a 44 Posted May 23, 2015 Never seen that command, learn something new everyday :) Share this post Link to post Share on other sites