why wont my player take damage in Unet
I have an issue, the take damage function is never called, my ray cast hits the collider of the other player, gives me the name of the other player in the console, but it just seems to stop right before the take damage function
this is my game manager script, I rewatched videos 6 through 8 a few times but I never found the issue private static Dictionary players = new Dictionary (); private const string PLAYERPREFIXID = "Player "; public static void registerPlayer(string _netID, Player _player) { string _playerID = PLAYERPREFIXID + _netID; players.Add(_playerID, _player); _player.transform.name = _playerID; } public static Player Getplayer(string _playerID) { return players[_playerID];
}
public static void unregisterplayer(string _playerID)
{
players.Remove(_playerID);
}
this is the script
private static Dictionary players = new Dictionary(); private const string PLAYERPREFIXID = "Player "; public static void registerPlayer(string _netID, Player _player) { string _playerID = PLAYERPREFIXID + _netID; players.Add(_playerID, _player); _player.transform.name = _playerID; } public static Player Getplayer(string _playerID) { return players[_playerID];
}
public static void unregisterplayer(string _playerID)
{
players.Remove(_playerID);
}
Your answer
Follow this Question
Related Questions
Both players take damage when hit?,both players take damage 0 Answers
Multiplayer melee game - client cannot deal damage 0 Answers
Client can damage host but not vice versa? 0 Answers
Android multilpayer problem when using device's hotspot. 2 Answers
Bunch of inquiries on MMO generals answer any that you know! 0 Answers