Jump to content
doc. caliban

Spawing player at nearest of multiple spawnpoints (automatically)

Recommended Posts

I've been digging around for an hour and have not gotten anything to work.

On player death, I would like to determine the nearest spawn point and set that to where they will respawn, as opposed to allowing them to choose or having it be random.

Any help is greatly appreciated!

-Doc

Share this post


Link to post
Share on other sites
29 minutes ago, davidoss said:

 

Thanks for the fast reply.

 

I've seen both of those pages... I am probably misunderstanding them, but my respawn modules are already placed.  I'm looking for a way to determine which one is nearest to the player's death and respawn them there.

 

-Doc

Share this post


Link to post
Share on other sites
Guest

Alternative answer,

Handle the death with an eventHandler, Save the death pos, OnRespawn EH, check for the nearest respawn to death pos through an array or something (there are efficient Bohemia functions for this) and teleport the player to _x location.

(If you still want to have the gear and stuff, you should probably still use the respawn system or Arma 3 and then combine it with the teleport thing.)

 

But anyway davidoss answer is better, juste add or remove positions based on the player location. Just be sure to only keep the one pos you want him to spawn to.

 

Regards.

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

×