Scripting


Humanoid Health


# Public Variables


# humanoidCore

Reference to the main HumanoidCore object.

    
    public HumanoidCore humanoidCore;
    
    
# health

Current health of the humanoid.

    
    public int health = 100;
    
    
# maxHealth

Max health of the humanoid.

    
    public int maxHealth = 100;
    
    
# isDead

If the humanoid is considered dead to our health script.

    
    public bool isDead = false;
    
    

# Functions


# SetHealth (int hp)

Set the humanoid health.

    
    humanoidHealth.SetHealth(100);
    
    
# GetHealth

Gets the humanoids current health.

    
    var health = humanoidHealth.GetHealth();
    
    
# Heal (int hp)

Will heal the humanoid by a certain amount of hp.

    
    humanoidHealth.Heal(50);
    
    
# Damage (int hp)

Will damage the humanoid by a certain amount of hp.

    
    humanoidHealth.Damage(100);
    
    
# Revive

Will revive a dead humanoid.

    
    humanoidHealth.Revive();
    
    
# Kill

Will kill a humanoid.

    
    humanoidHealth.Kill();