public script reference that can be used for lots of scripts

I want to have a general health script for all NPC’s, Enemies or Creatures so when a spell hits them it can handle damaging health.

Within that script I want to reference a more specific script so, say the health drops below 0 the script can call a function called Died() that I’ll put in each specific script, these would be anything from Chicken to UberDaemon. So the Chicken prefab would have a Chicken script to do the specific stuff and likewise UberDaemon an UberDaemon script.

So the damage done by weapons or spells can tell the health script to do damage but if the damage kills the Creature or NPC etc. when Died() is called the animation are unique.

I can reference scripts but that seems to need the script name so not really generic.

Is it possible or do I need a different approach?



    float health = 100f;

	void ApplyDamage(float _power) {
		health -= _power;
		if (health <= 0) {
			gameObject.SendMessageUpwards("Die"); //It's calls every Die() function in my gameObject's scripts.


    void Die() {

Read It: