Jump to content

Recommended Posts

Today i noticed that the setPos function fucks up under some circumstances.

 

Example:

 

in eden editor, i placed an object in the sky and tried to use setPos to get the player teleported to that building

with this init inside another objects init field 

this addAction["<t color='#ff9900'>Teleport</t>", {player setPos [22081.963,10731.634,1600]}];

my object was exactly at z=1599.70. Once i run the mission, and use the action, i get teleported 1600z coordinates above the object. So i started testing.

 

Test 1: Z=0

 

get teleported to sealevel-

 

Test 2: Z=1000

 

Get teleported to z=1000 (600 units under the object)

 

Test : Z=1590

 

Get teleported just under my object.

 

As a conclusion. the setpos seems to be fucked up. If you try to teleport the player inside of an object or building, it chooses to teleport you Z amoutn above said object. Now i dont know if this is a feature or a bug, so im posting it here if someone has a solution.

Share this post


Link to post
Share on other sites

When reproducing the situation on Altis, I placed a Bungalow building object at said coordinates of 22081.963, 10731.634, 1600, and I place a unit nearby on land. While still in the editor, when I place the player on the position of the Bungalow by manually setting it's location parameters, it seamlessly is moved to the exact position inside the Bungalow. Although, when starting the scenario and using the in-game debug console to teleport the player to the coordinates, the player is spawned an additional 1600 meters over the object at z=3200.

 

Concluding this, it seems that all object positions are measure by ATL in the editor. Correct me if I'm wrong on this, but again in-game, the player position is then measured in AGLS. This is why the setPos isn't broken.AGLS will measure z over x and y. So when we have this bungalow on x and y, we are telling it to teleport the player 1600 above said object. In-game, the Bungalows position is measured in ATL, so to solve this would be to either use the command setPosATL on the player, or you can simply keep the z position in setPos at 0.

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

×