Jump to content
Sign in to follow this  
gadjr114

Player Respawns...Please help!

Recommended Posts

I am making a scenario without any mods running.  I would like to give players the option to either respawn at their location of death or at a set location (IE in a base of operations).  I currently have RESPAWN enabled in the scenario and have it set to POSITION OF DEATH, but I am unable to set it to both "position of death" and "custom location".  Is there a way to accomplish this in the Eden editor?  Any help would be appreciated.

 

Thank you!

Share this post


Link to post
Share on other sites

In editor / multiplayer, you can choose the   "respawn on custom positions" and enable "choose position"

place some respawn points (respawn point modules for your side..)

Then for your own position (or any position of any player):

in initPlayerLocal.sqf :

 

player addMPEventHandler ["MPkilled", {
  _victim = _this select 0;
  deleteMarkerLocal format ["respawn_west_i%1",name _victim];
  _mark = createMarkerLocal [format ["respawn_west_i%1",name _victim],getPosATL _victim];
  _mark setMarkerTextLocal (name _victim);
 }];

Probably some other solutions...

Share this post


Link to post
Share on other sites

Okay, actually, it seemed to work perfect - but for me only.  Any other player that joins the game cannot spawn in anywhere.  There are just stuck at the map.

 

I am hosting and playing on my own PC.

Share this post


Link to post
Share on other sites

Did you writethat in initPlayerLocal.sqf ?

 

There is no "player respawn position" at start, just "base or MHQ" respawn points. It's a choice. You can add a respawn marker as I did but in init.sqf, just for local player.

 

Note: I remarked a remaining possible respawn on old buddy's death position (if the guy already respawned before you) because his marker is not deleted/updated.

It's easy to correct:  I used MPEH MPkilled for other reasons.  You just have to change for simple EH (addEventHandler) and "killed" instead of "MPkilled". Then your EH will fire only on dead player's PC.

Share this post


Link to post
Share on other sites

Well, I have the Multiplayer Respawn point placed in the base where I want it.  And I did the initPlayerLocal.sqf as you told me.  But it was making me select a spawn when the mission started which I thought was wierd; I want it to just place the players down in the designated starting position upon the mission start, not ask where they'd like to "spawn".

 

I will try to change the MPEH to EH and MPkilled to killed and see if that changes anything.

Share this post


Link to post
Share on other sites

You can add in description.ext

respawnonstart = -1;

 

This way, nobody is forced to respawn when joining.

Share this post


Link to post
Share on other sites
10 hours ago, pierremgi said:

You can add in description.ext

respawnonstart = -1;

 

This way, nobody is forced to respawn when joining.

Is there a way to do this without the use of a description.ext file?  I currently don't use them as alot of the information is in the Eden editor now and I really don't want to add it all to the description file again. lol

Share this post


Link to post
Share on other sites

Nevermind, I got the respawnonstart = -1; to work correctly... now i just need to see if the respawn selection works with other players on the server.

 

Thank for all of your help so far

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  

×