I am having a small issue using the componet command from my C## script, my current script is javascript and I want the script to add health by using this command inside of my "PlayerHealth.Cs" file.
AdjustCurrentHealth(+10);
Both of my scripts are attached to my player but when I tried to use
var Script : PlayerHealth;
I get an error saying it cant find my PlayerHealth file.. so please and thank you! Stuck :/
GUI.skin = HEALTHPOT;
if (bagopen == true) {
if(GUI.Button (new Rect(Screen.width - Screen.width/8, Screen.height - Screen.height / 3.6, 64, 64), healthpots + "")) {
if ( healthpots >= 1) {
healthpots --;
}
}
}
↧