Jump to content
Sign in to follow this  
barbolani

JIP And setpos

Recommended Posts

Hi,

On my mission I have mobile respawn (just setMarkerPos "respawn_west") and I find JIP players spawn on the editor original position, instead of in the new place.

Tried lots of things, use a object position instead the marker, execute an external script on init.sqf ,onPlayerConnected, onPlayerRespawn.... nothing. JIP players have to respawn to be in the good position.

Any help is welcome.

Thanks!

Share this post


Link to post
Share on other sites

initPlayerLocal.sqf:

if ((_this select 1)) then {player setPos (getMarkerPos "respawn_west")};

Share this post


Link to post
Share on other sites

thanks man but no luck.

Tried even this way:

if ((_this select 1)) then {player setPos position mapplacedobject};

No luck.

Seems a JIP client is not syncronised on marker and objects positions and uses the initial editor placed pos.

Tried with a sleep 20 and seems to interrupt the script, but no error on .rpt

Share this post


Link to post
Share on other sites

Try this in the init.sqf

 "respawn_west" setMarkerPos (markerPos "respawn_west");
player setPos (markerPos "respawn_west");

This should update the marker position to the 'current' position before the player is moved.

Share this post


Link to post
Share on other sites

tried also without if statement. On hosted server it is not working. Cannot test on dedi.

EDIT: There must be something about setposing on local and position sync on dedicated.

On a "select the position of your hq" script, executed local, things don't move where I want, when I repeat the script three times on the console, then things get placed propertly.... Execution on server may be a solution?

Edited by barbolani
  • Like 1

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  

×