Jump to content
Sign in to follow this  
Vänskä

Setpos getpos not working?

Recommended Posts

Good old setpos getpos does seem to work on every object in MP. I´ve always been using

this setpos[getpos yourguy/object select 0, getpos yourguy/object select 1, 1]

to fix the position of objects or units (in OFP I mean). However in ArmA I noticed that this does not work for most of the objects (it does work for units). And actually it does work for objects in the editor but when you take your mission to MP (dedicated server) you could get some funky results.

Anyone know what I should use to make this work?

Share this post


Link to post
Share on other sites

When I try to reposition myself and my squad over the long distance, something gets f*** up smile_o.gif

Basicly my character is repositioned, I can normaly play it, but it is not shown on the screen, neither are my squad mates (although they appear to be next to me on the map). I can walk around, do various things, but I am invisible.

It also seems characters are not present on the given point, because when I plant a satchel charge and blow it up, nothing happens to me or my squad mates, but it does affect the environment (trees or other units in the area, which were not repositioned).

Moving vehicles with setVehiclePosition ussualy ends up with a truck half burried in the mud, or some other funky resoult...

At the moment I only found one unussual workaround for this. I place units in a Ural truck, reposition Ural, kick units out of it and reposition Ural to 0,0,0.

Share this post


Link to post
Share on other sites

Could this be related to terrain streaming? Maybe camPreload or something like that can help...

Share this post


Link to post
Share on other sites

For objects...

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">this setpos [(getpos this select 0),(getpos this select 1),1]

...should work. I Tested it with a static M2.

Greetz

Plage

Share this post


Link to post
Share on other sites

It can be that ArmA is more sensitive concerning brackets. You may have to write

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">(getpos this) select 0

instead of

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">getpos this select 0

This is just a guess combined with some information about this topic I have got.

Share this post


Link to post
Share on other sites

@HappyG: How do you reposition the truck?

Tested on a dedicated server??

On a dedicated server it seems setpos works only for players.

regards

[uMPC]Hunter

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  

×