Jump to content
Sign in to follow this  
Petethegoat

Get direction of marker?

Recommended Posts

Solution: https://community.bistudio.com/wiki/markerDir

There's a function to set the direction of a marker, but not to get the direction (except in VBS2, where this function does apparently exist).

Is there any other way I can get the direction of a marker?

Or a way to get a reference to the marker object?

I'm creating a script to randomly place a unit at one of four markers, but I would like it to be able to set the unit direction as well.

_unit = _this select 0;
_pick = ((floor random 4) + 1);
_marker = _this select _pick;
_unit setPosATL getMarkerPos _marker;
//_unit setDir [b][color="#B22222"]getMarkerDir[/color][/b] _marker;

Any help would be much appreciated.

Edited by Petethegoat
Solved

Share this post


Link to post
Share on other sites

There is no need for a script for this : simply group (F2) the unit with the markers, and it'll place the unit randomly at one of the markers positions.

But that doesn't answer the main question :o

Share this post


Link to post
Share on other sites

Huh, that's new to me!

That said, it still doesn't align the unit with the marker when you group it, so I'm still stuck for the moment.

Share this post


Link to post
Share on other sites

I have indeed struggled with this exact issue and determined that the best solution was to use Game Logic units instead of markers. Although if anybody has further details I would be interested to know as well :)

Share this post


Link to post
Share on other sites

Ah, well that's simple! I wish the function naming was more consistent, but oh well.

Thanks very much, trnapster.

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  

×