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.


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";