reset player location on respawn (persistence enabled)

  1. 9 years ago

    Hi all,
    first of all: this mod is awesome !!

    but i have a little problem building a mission.

    So my problem is:
    i would like to reset the player position to a random spawn position (respawn_blue_1, respawn_blue_2,...)
    when he dies (the loadout is resettet also by an onPlayerRespawn.sqf - this may also have effect on reconnect but should not)

    we have persistence enabled so when player reconnects he should be at the saved position.
    when he dies he should, be completle resettet.

    so my question is there a way to set this data ?
    have seen in the getPlayer setPlayer functions are the position saved , is there a way to replace the _postion with a custom postion in the onPlayerRespawn.sqf ?

    thanks for reading
    i hope you will understand what i am looking for
    and sorry for my poor english skills

    dnl

  2. So let me get this straight, you want a player to respawn to a random respawn location when he dies and you want his persistent data to save to the database when he respawns at that random location?

  3. first of all thanks for answering!

    it was the complete oposite - but the problem now is been solved - myself messed up the respawn with the onPlayerRespawn.sqf ..
    also i got confused by dublicating myself when fast disconnect and reconnect and also by dieing and fast dis/reconnecting - after some more testing now it works fine - just sometimes players dublicate themself when they have connection issues... for this dublicating "issue" i think it should be related to the time difference to the "cleardeadbody functions"

    but thanks for trying to understand my confusing brain farts ! :D

 

or Sign Up to reply!