I am using BurgZergArcade tutorial and i am currently on the melee combat tutorial, now i am using this script which is from that tutorial
and i have no idea what this means, could someone help me out?
It means that unity can't reach the function / method "AddjustCurrentHealth" of the EnemyHealth class.
Either that method does not exist, or you have spelled it wrong or unity can't reach the file.
Hmm, by the way... I'm not sure but could it be because you are typecasting the target as an EnemyHealth class?
I suppose target is defined as a Gameobject since you're trying to reach a component from it. By adding (EnemyHealth) before target means that you are trying to load that gameobject as if it was a EnemyHealth class ( If I'm not mistaken? ) :P So comment that line out and try this:
EnemyHealth eh = target.GetComponent< EnemyHealth >();
answered Feb 19, 2012 at 01:28 AM