Behaviors API

Note: Because the Emerald Behavior script contains a lot of virtual functions, and is intended to be customized through a custom derived script, the API for this is minimal.

Change Behavior

Changes the AI's current behavior to the one specified. By default, the internal BehaviorState is set back to its default "Non Combat" which will then allow the AI to update its current state based on its new behavior.

EmeraldAPI.Behaviors.ChangeBehavior(EmeraldSystem EmeraldComponent, EmeraldBehaviors.BehaviorTypes BehaviorType)
//Example - Changes the AI's behavior to Aggressive
EmeraldSystem EmeraldComponent = GetComponent<EmeraldSystem>(); //It is recomended that you cache this somewhere
EmeraldAPI.Behaviors.ChangeBehavior(EmeraldComponent, EmeraldBehaviors.BehaviorTypes.Aggressive);

Last updated