Easiest way to get the team player belongs to?
Options
Hi,
I am using the Photon Teams Manager script to put my players in 2 different teams.
I have a shooting mechanic where I would like to add that the bullets only deal damage to the enemy team of the player.
I have a GameManager script where I spawn players on different spawn points based on what team they are using PhotonNetwork.LocalPlayer.GetPhotonTeam().Name == "Team1".
My question is how can I get the team of the other players?
Do I make a boolean isTeam1/isTeam2 and then run a check with that?
Any help is kindly appreciated.
0
Answers
-
Hi @MonsieurBond,
You need a reference to the other remote player then use the same extension method as you use for the local player: otherRemotePlayer.GetPhotonTeam().
0