Jump to content
Sign in to follow this  
KrazySwede

Unable to get accurate position of a placed backpack with getPos

Recommended Posts

I named a backpack "thepack" and placed it next to me in the editor. I then entered the following into the Debug console to return my position and that of the pack:

hint format["Me: %1\nPack: %2",getPos player,getPos thepack];

It returned two very different positions, even though I was sitting right next to the pack (see image). I am trying to mark the pack's position with a marker, but this is proving difficult since I can't rely on getPos to get the the pack's position.

Does anyone know why this is happening?

http://i.imgur.com/ZvuRBqb.jpg (305 kB)

Thanks,

KrazySwede

Share this post


Link to post
Share on other sites

Try getposasl or getposatl

Share this post


Link to post
Share on other sites

Here is a snip-it of something I'm working on:

The Marker is ADcellMarker and the Unit is ArmsDealer.

Just rename it to fit yours. I'm simulating tracing a Cellphone signal

of an Arms Dealer & Warlord working with the Iranians on Stratis to

smuggle SAMs into the region in violation of international law.

_marker1 = createMarker["ADcellMarker",getPos ArmsDealer];
"ADcellMarker" setMarkerShape "ICON";
"ADcellMarker" setMarkerType "hd_dot";
"ADcellMarker" setMarkerColor "ColorKhaki";
"ADcellMarker" setMarkerText "";
"ADcellMarker" setMarkerAlpha 1;
[] spawn {
while{not isnull ArmsDealer} do {"ADcellMarker" setMarkerPos getPos ArmsDealer; sleep 60;};
};

Share this post


Link to post
Share on other sites

if your trying to put a marker on the backpack and "getpos" is fighting you, why not just attach a marker to it with "attachTo" command then detach it ?

Share this post


Link to post
Share on other sites

If nothing was changed recently, you can't attach markers to anything using attachTo

Share this post


Link to post
Share on other sites
If nothing was changed recently, you can't attach markers to anything using attachTo

huh, learn something new everyday :)

on another note, and I just tried

"thismark" setMarkerPos getPosATL guy1

marker named- thismark & object named - guy1

and it put the marker right on him with no issues like always.

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  

×