pick random number and synchronise it?

Options
Okay, im gonna get right into my problem. What i want to do is, when all but one players are dead and it says who won and so on, i want to pick a random number and instantiate a map layout into the game based off that number. How can i make sure the number is the same for each person in the room?

Comments

  • Gage_IAG
    Options
    You can use custom room properties for this. If youre having the master client handle this then just call the set custom properties method on the room and supply the lets say "mapLayoutIdx" int with the randomly generated number. That way all players will receive the same number and there is only one player responsible for populating it.