Spawn single players in specific locations
Options
I’m creating a virtual classroom. My goal is to have the players select their avatar, then the screen will come up asking them for seat selection around the table. This will be similar to when you purchase a movie seat at your local theater. You would select your seat which would be highlighted then once you hit the play button the game would start and you would be placed at that location. My question is how would I do that?
0
Best Answer
-
I assume you are using the PUN package, however noting that i would post this question in the PUN forum thread.
As for your question, it really depends on how many seats there are available to choose from, if its a small amount you can get away with this via Room Properties or Player Properties, if its alot of seats, then perhaps you can go about allowing each player to have a synced int (or even an RPC method distributed to all players for that assigning that int) designating their seat selection and thus setting this locally, it will be shown to the room. From here you can iterate through each connected player to review which seats (int index) are taken and perhaps block those from being selected by other players or not.
Theres a bunch of ways you can do about working through this, these are just a few methods.5
Answers
-
I assume you are using the PUN package, however noting that i would post this question in the PUN forum thread.
As for your question, it really depends on how many seats there are available to choose from, if its a small amount you can get away with this via Room Properties or Player Properties, if its alot of seats, then perhaps you can go about allowing each player to have a synced int (or even an RPC method distributed to all players for that assigning that int) designating their seat selection and thus setting this locally, it will be shown to the room. From here you can iterate through each connected player to review which seats (int index) are taken and perhaps block those from being selected by other players or not.
Theres a bunch of ways you can do about working through this, these are just a few methods.5