- Home /
Photon - How to spawn enemies that don't have a PhotonView and be synced with other clients
I am making a multiplayer FPS, in this FPS, the player(s) will have to fight hordes of zombies, however, I can't attach a PhotonView to each zombie as that would exceed the maximum number of messages that can be sent per second (500). I am trying to spawn the zombies on the MasterClient and have the zombies update their targets occasionally, then every other client will update their targets. However after an hour or two, using RPCs and similar, I have been unable to properly sync them with the players.
Answer by ChristianSimon · Jul 17, 2018 at 02:15 PM
Hi,
there is an example how Manual Instantiation works on this documentation page. Instead of using PhotonView components for each object, you can use an unique ID for each Zombie. To have a certain intermediary you can add a Manager where the Zombies have to register themselves (therefore the usage of unique IDs). The Manager can handle updating the targets of each Zombie and synchronize this information across all clients in the room by using the RaiseEvent function for example.