AXORTH
1
Hi !
I am a beginner on Unity and I have a problem…
I am currently creating a game that uses UNet and, once the number of players connected in a room, starts a game. During the game there will be one of the 10 players who will be chosen randomly and will become a hunter. The others will have to go hide themselves.
So I don’t know how to make sure that one of the players is chosen at random and turns into a different prefab when starting the game.
I do not know where to start so any help would be welcome !!
PS: Excuse me if there are misspellings I am French and I’m not strong at english
@AXORTH there are a number of ways to deal with the this for beginners I would suggest that you pick a player at random from the server and activate a bool “IsHunter” (it could even be an other script or child gameobject) while turning off the initial settings of the “hunted” this would make it possible for you to make 1 prefab that contains all of your settings instead of trying to change the spawn etc… (even though your request is possible this is the easiest approach u can have).
SMALL FRENCH EXPLANATION:
il te faudrai un avoir les 2 object dans le meme prefab player et puis tu active le Hunter pour le joueur que tu choisi et tu desactive l autre du coups sa te simplifira le travail enorement.
AXORTH
3
Thank you @dargonknight for making a French translation!
Thanks to you I understood how to do
Did you know how to select at random one of all connected players ?
Thank you !