Hi,
How can I sync the life of the players across the network and display only the life of the player i control locally?
I have a playerBehavior and a bulletBehavior.
In the payerBehavior I have this code for syncing the life.
And in the bulletBehavior this code, to deal damage when hitting other players with bullets.
1. This isn't working as expected. Only the first player can deal damage, and then damages himself by shooting the other player. What am I doing wrong here?
2. Where do I have to instantiate the EnergyBarPrefab? In the OnSyncedStart only things that are going to by synced are assigned, or?
Thanks, John
How can I sync the life of the players across the network and display only the life of the player i control locally?
I have a playerBehavior and a bulletBehavior.
In the payerBehavior I have this code for syncing the life.
And in the bulletBehavior this code, to deal damage when hitting other players with bullets.
1. This isn't working as expected. Only the first player can deal damage, and then damages himself by shooting the other player. What am I doing wrong here?
2. Where do I have to instantiate the EnergyBarPrefab? In the OnSyncedStart only things that are going to by synced are assigned, or?
Thanks, John