FANDOM


Emerald has public functions you can call to make it easier to make custom scripts.

Returning an animal to its starting position Edit

Emerald automatically handles this when an animal is exhausted or cooling down, but if you need to call it from a custom script, you simply do the below after you have gotten a reference of Emerald.

GetComponent<Emerald_Animal_AI>().ReturnBackToStartingPoint();


Applying damage to an animal Edit

If you would like to apply damage to an animal from an external script, you can do the following. The variable "damage" is the amount of damage you'd like to be dealt to the animal. This can also be used for ranged damage. Be sure to have a reference of Emerald when you do this.

GetComponent<Emerald_Animal_AI>().Damage(damage);

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.