This page describes how to set up the Dialogue System with Emerald AI 2.0 by Black Horizon Studios. (Emerald AI 2.0 is required.)
Emerald AI copyright © Black Horizon Studios.
Third Party Support/Emerald AI Support
. This will unpack files into the folder Third Party Support/Emerald AI Support
.Prefabs
folder.You can use the Lua functions below in your dialogue entry Scripts and Conditions (or anywhere you use Lua). Note the exact number and type of parameters required for each function.
Lua Function | Description |
---|---|
DamageEmeraldAI("faction", amount, "targetType") | Damages all AI of the specified faction. Damage comes from the type specified by targetType (Player, AI, or NonAITarget). |
SetEmeraldBehavior("faction", "behavior") | Sets the behavior (Aggressive, Cautious, Companion, Passive, or Pet) of all AI of the specified faction. |
SetEmeraldDestination("faction", "destination") | Sets the destination (name of a GameObject) of all AI of the specified faction. |
EmeraldAIFollow("faction", "target", "followAs") | Makes all AI of the specified faction follow a target (name of a GameObject) as either Companion or Pet. |
EmeraldAIStay("faction") | Makes all aI of the specified faction stop following. |
Examples: