Goals

Is a list of strings pointing to a desire state this agent wants to be in.

In this particular example, he just wants to Kill.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/888b0812-7e53-4ac8-8ef3-920ec0bb9de2/Untitled.png

The custom inspector allows 3 types. This is because we don't want to be stuck to string literals. Ref: Right click in your project window and click Create/Games/AI/State, drop this file in and this is now a string reference. Make sure you add the value to it though.

Text: A string literal for the expected effect.

Code: This is a rare case, but you may want an agent's goal to be modified by code. For this you need to create a new class and inherit Concatenator. After that, add the new class on any game objects and assign it to the Code reference.

public class FooDynamicGoal : Concatenator
{
    public bool BadPerson;

    public override string Evaluate()
    {
        return BadPerson ? "KillPlayer" : "HelpPlayer";
    }
}