Hi!
I creating a HP script. The bullet what enter the player’s trigger contain a string with a var called “damagepoints”. The hp script has a “getdamage” integer. How can I access from the player object’s HP script to the Bullet’s script value?
I try this in the HP script (unsucceful):
var bulletscript = other.GetComponent(“bulletdamage”); //bulletdamage = bullet script name
var getdamage = bulletscript.damagepoints(); //try to get the damagepoints var.
Please help me.
(sorry for bad english)