Jump to content
Sign in to follow this  
kupcho

Waypoint facing?

Recommended Posts

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

i guess you could do something like this

in the waypoint onAct field you need to put

_nul = [

  1. ,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

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

Never seen that command, learn something new everyday :)

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  

×