Jump to content
Sign in to follow this  
itchy_trigger

Get coordinates

Recommended Posts

Hi I want to move a unit from one place of tne map to another one using SetPos. The thing is that I don't know wich are the X,Y,Z coordinates for the place I want them to be transported.

I tried placing a unit in the place I want the to be transported. The look in the mission SQM file and type the coordintes it says there and use them with the Setpos command but it doesent work.

Any Ideas

Share this post


Link to post
Share on other sites

Yes, the coordinates in the SQM are XZY, so just reverse the last 2 coordinate values.

Share this post


Link to post
Share on other sites

setPos X Z Y like bn880 said. X is East-West, Z is North-South, and Y is Up-Down. Y at 0 is ALWAYS ground level (which explains how you get the good "ground effect" when flying a heli low to the ground, but that's another story).

The best thing to do is put a Marker on the map where you want the unit to go, make it instead of an Objective, make it Empty. This can't be seen by the player. Name the Marker and then in your code do..

AUnit setPos getPos MyMarker

Doolittle

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Doolittle @ Nov. 09 2002,21:05)</td></tr><tr><td id="QUOTE">AUnit setPos getPos MyMarker<span id='postcolor'>

shouldn't it be

AUnit setPos getMarkerPos MyMarker

?

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">AUnit setPos getMarkerPos MyMarker<span id='postcolor'>

Without any offense,

but shouldn't it be:

AUnit setPos getMarkerPos "MyMarker"

:note - the two "" exclamation marks (correct me, if i used

the wrong words for the two ""), are required if you work with

set/getpos stuff + markers.

I'd rather use a game logic instead of a marker, but this is

only, because i prefer the gamelogics to markers (gamelogics

can be used for other stuff aswell, but that's another story).

~S~ CD

Share this post


Link to post
Share on other sites

Hehe..yes you're both right.  Sorry 'bout that!

AUnit setPos getMarkerPos "MyMarker"

(Duh..) (Yeah I prefer GameLogics too...)

Doolittle

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  

×