Player.ID Question
Is it possible to make it so when a player leaves, their player ID becomes available, and the next person joining gets that ID?
The application I'm setting up functions with no more than 8 users, (because of the sizing of arrays), and I'd rather contain the 8 active players in those arrays, than allow the player ID to get above 7 or 8, and not be able to reference an array index by player ID because the ID has gone over 8.
I believe currently anytime a user connects, they get the next non-used player id, so if there are 8 players, and one leaves and reconnects, they become ID 9 instead of 8.
For clarification, that is mostly the situation I'm concerned about, one of the 8 set users connecting, then disconnecting and reconnecting.
Or are there any practices you can think of that would be a good solution to this?
Thank you!
The application I'm setting up functions with no more than 8 users, (because of the sizing of arrays), and I'd rather contain the 8 active players in those arrays, than allow the player ID to get above 7 or 8, and not be able to reference an array index by player ID because the ID has gone over 8.
I believe currently anytime a user connects, they get the next non-used player id, so if there are 8 players, and one leaves and reconnects, they become ID 9 instead of 8.
For clarification, that is mostly the situation I'm concerned about, one of the 8 set users connecting, then disconnecting and reconnecting.
Or are there any practices you can think of that would be a good solution to this?
Thank you!
0
Comments
-
No, it's not possible to assign a used ID to anyone new.
The new player doesn't know anything about his "fake" history, if he would take over another one's place.
We are looking into making a re-connect possible. But that only works for someone leaving and returning.
I can't say when this gets ready to use, so in the mean time you could either find a workaround or disallow this situation until we implemented re-connects.
Sorry I don't have better news.0 -
Thank you for the info, I'll look into storing alternate ID's in arrays or lists then, and using those instead.0