Jump to content
strider42

[SOLVED] Respawn on specified position - dedicated server

Recommended Posts

I want to respawn on a specified position on the deck of the USS Freedom.

It works fine when running multi-player from the the Eden editor (as a player server).  i.e. I respawn at the respawn module position.

However when I export the mission and run it on a dedicated server I just respawn were I died.

 

Respawn Position module:

Variable name: respawn_west

Name: respawn_west

Type: Invantry

Side: BLUFOR

Show to: Everyone

Notification: Enabled

 

Attributes > Multiplayer... Respawn:

Respawn: Respawn on Custom Position

Rulesets: Show respawn counter

Respawn Delay: 3

Show Scoreboard: checked

Allow Manual Respawn: checked

 

Anyone else seen this behaviour or know what i am doing wrong?  S

 

My solution:

The issue is associated with trying to use the 'respawn module' on the USS Freedom. It works fine on land.

Doing the respawn the classic way using a respawn marker also does not work on the USS Freedom. This time you end up swimming in the water and maybe in the USS Freedom.

I resolved this by creating a respawn event handler that placed the player just above their starting point. I used the following code in the init.sqf file, to only run on a client PC:

if ( hasInterface ) then {
   // We are running on a player client.

   Stri_miss_playerPos = ( getPosASL _player ) vectorAdd [ 0, 0, 0.1 ];
   Stri_miss_playerDir = getDir _player;
   _player addEventHandler [ "Respawn", {
         params[ "_player", "_corpse" ];

         _player setVehiclePosition[ Stri_miss_playerPos, [], 0,
                "CAN_COLLIDE" ];
         _player setDir Stri_miss_playerDir;
      }
   ];

};

 

Edited by strider42
Resolved issue

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

×