Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
GhostRaven

Is there a setpos tutorial?

Recommended Posts

I was just wondering if there was a tutorial for using the setPos command?  If so...could someone post it or a link? Thanx.

Share this post


Link to post
Share on other sites

Not that I know of, but what is there to not understand?

for example:

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">bob (the name of the soldier) setpos (setpossition) [getpos (gets the position of the object in the next statement) bob select 0 (selects the first var in an array, 3d space array 0 = x co ordinate), getpos bob select 1, getpos bob select 2] <span id='postcolor'>

The explination is in the brackets.

RED

Share this post


Link to post
Share on other sites

Yup. Altitude from 0 and up

/

UnitName setpos [x,y,z]

/ \

West to east South to north

Measured in meters(It seems)

Funny thing with setpos:

If you try:

this setpos [getpos Plane1 select 0,getpos Plane1 select 1,getpos Plane1 select 2]

The object probably wount appear at the same hight as the plane but in the same altitude as the water(under the ground).

This is pretty stupid, seems like some when U ask for the alt of some objects it returns the alt of the water, some objects return other altitudes....

If you use this:

this setpos getpos Plane1

U will get the altitude of the plane and not the water, the tricky thing is when U want to place the object like -5 of the planes altitude or +5 meters....

Can someone explain why and if there is anything U can do about it?

Share this post


Link to post
Share on other sites

I'm not going to test this out right now, but if what you say is true, this should solve your problem.

_newPos = getPos plane1;

this setPos [_newPos select 0, _newPos select 1, (_newPos select 2) + 10];

I got over the problem you mention before, I can't remember clearly how.

Share this post


Link to post
Share on other sites

Sorry to dig up an old thread, but I have a question.

What I'm trying to do is put a helicopter on the pad of an LSD. I'm trying to use setpos to do this, but I cant' find out what to put in the [0,0,0] section of the script. I think it's the distance, in meters, from the lower right (correct?) corner of the map.

If that's true, is there any way I can measure the distances that I need without just taking a blind guess?

Share this post


Link to post
Share on other sites

use the camera.sqs within a trigger. This way you can navigate to your LSD and exactly to the position you want the helo to be. Then press STRG and the position is saved to clipboard.txt in your OFP folder. This way you get the exact coordinates.

Share this post


Link to post
Share on other sites

Sorry, but I'm not that good with triggers. I'm really just starting out at this.

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  

×