Jump to content
Sign in to follow this  
Deth Stryker

2d and 3d position coordinates

Recommended Posts

I'm trying to get a unit to go to a specific coordinate via a marker and domove. However it requires I know the x,y or x,y,z coordinate I want it to go to. How do I get this info? Maybe I didn't use the right search words but there seems to be no info on this.

Thanks

Share this post


Link to post
Share on other sites

Just getting started, eh? smile_o.gif

Say your unit is named loon and your marker is named mark1.

Try this:

loon domove getMarkerPos "mark1"

If for some reason you want to get at the x,y,z coodinates of your marker, do this:

coords = getMarkerPos "mark1"

At this point your variable coords is an array containing [x,y,z].  To get at these values, do this:

x = coords select 0

y = coords select 1

z = coords select 2

Good luck in your endeavor.

Share this post


Link to post
Share on other sites

Yeah my question stinks of noobism doesn't it?

Thanks, that is exactly the kind of answer I need.

Share this post


Link to post
Share on other sites

new question, using the info above I made a trigger that when activated makes a waypoint. However upon a second trigger and a new waypoint there is no change from the first.

Does my group have to get to the first created waypoint before the second will show? Or how do I properly use the removewaypoint command?

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  

×