Jump to content
Sign in to follow this  
kfine

Determining x,y,z coordinates

Recommended Posts

Is there a way to determine a units or vihicles x,y,z coordinates for cutscenes?

Share this post


Link to post
Share on other sites

Give it a name. then save the mission.

Open the mission.sqm and search for the unitname. There you'll see its coords. But the sqm-file shows the coords as [X,Z,Y]. So you'll have to rearrange the numbers a bit.

An easier way is to use the built-in script "camera":

player exec "camera.sqs"

press right-ctrl and the coords will be dumped to clipboard.txt in your OFP-folder.

If you only want the camera to look at a certain unit, you could also use: camtarget unitname

Share this post


Link to post
Share on other sites

you can allways use the getpos method for a cutscene :

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">_xunit = getpos unitname select 0

_zunit = getpos unitname select 1

_yunit = getpos unitname select 2<span id='postcolor'>

you could display there co-ordianates like :

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">hint format ["X position = %1 , Z position = %2 , Y position = %3"_xunit, _zunit, _yunit]<span id='postcolor'>

though i don't know why you would want to use this smile.gif

RED

Share this post


Link to post
Share on other sites

I tried the trick with pressing the right "CTRL" key and pasting it on a notepad. Yet when I did it I could not paste anything on it. There was nothing to paste to the notepad. I tried the following. I put as you say in the players Int field "aP exec "Camera.sqs" and opened the preview of the game. This was while the game was in "Mission" setting. I rotated the player to view a different direction and pressed the right "CTRL." This key is not bound to anything in the game option. Then I went to a plain notepad and while the cursor is in the field of the notepad, I pressed the right "CTRL" and "V" keys together at the same time. I got nothing. No corrodinates or anything.

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  

×