Hello, I was making a multiplayer fps and tried to add AI
now, my AI doesn’t do damage to the player(s)
I only get this debug error: ‘Sendmessage hp has no receiver!’
this is the code from the error: target.SendMessage( "hp", Random.Range(minDamage, maxDamage)); hp is the public variable of the player health and this is the target: var target : Transform; `
I did assigned this with NetworkingPlayer (is it to do with the change of the object name to the player name cause it’s multplayer?)
This is probably a very stupid mistake, but I can’t fix it
thanks, my playerdamage script is in cs what is the alternative for that?
– ik_jolanHere you go public void PlayerHealth( float health) { hp = health; }
– Sundarthanks ;p it works fine now
– ik_jolanCan you accept this answer as it would help others who have same question.
– Sundarhow do you mean?
– ik_jolan