Ok so I have a question. I have a script with some custom classes on it. So in other scripts I can use those as a variable type and it works. Ar there any tutorials on custom classes? And for some reason when I have a function in one nothing happens? Any idea? I trigger it but nothing happens.
var YourCharacter : Character = new Character();
YourCharacter.CheckHealth();
#pragma strict
class Character //A playable Character
{
//stats
var Name : String;
var Health : float;
var dam : float;
var armor : float;
var stam : float;
var sight : float;
function CheckHealth(){
print("Checking Health");
if(Health < 2){
print("Character is died");
}
}
}
Why is the function not triggerd?