playMaker

Author Topic: Photon - Spawning common object to all players  (Read 298 times)

heavygunner

  • Sr. Member
  • ****
  • Posts: 340
    • View Profile
Photon - Spawning common object to all players
« on: October 25, 2020, 01:23:51 PM »
Hi !

This is for aa co-op game. Random zombies will be spawned from Game manager. If Zombies array had 5 zombies, system will spawn random every x seconds. What i want is, since Game Manager is common for all players, how to spawn same zombies for all players in that room ?

new to photon.

Thanks

LordHorusNL

  • Beta Group
  • Full Member
  • *
  • Posts: 218
    • View Profile
Re: Photon - Spawning common object to all players
« Reply #1 on: October 25, 2020, 05:42:56 PM »
You only want the Game Manager on the Master client to spawn the Zombies with a Photon instantiate action and this should automatically replicate the Zombies on the other clients.

In most cases you want the Master Client to be responsible for spawning NPC's over the network. The official Photon forum is a good resource for questions about networking.