Topic: Getting SimpleAI to Work (SimpleBehaviour Scripts)
Hi,
I am having trouble getting SimpleAI to work.
I have set the SimpleAI for player2 inside the UFE.cs class and I set the Random AI in the _StartGame() method like this:
if (UFE.config.aiOptions.engine == AIEngine.FuzzyAI)
{
UFE.SetFuzzyAI(1, UFE.config.player1Character);
UFE.SetFuzzyAI(2, UFE.config.player2Character);
}
else
{
print("SETTING AI for Fuzzy AI vs Simple AI");
UFE.SetRandomAI(1);
//print("setting simple ai " + simpleAIBehaviour.name);
UFE.SetSimpleAI(2, simpleAIBehaviour);
}
, and passed in a simpleAIBehaviour as a static variable, however, the predefined actions do not occur as defined in my SimpleAIBehaviour script.
public static void SetSimpleAI(int player, SimpleAIBehaviour behaviour)
{
if (player == 1)
{
UFE.p1SimpleAI.behaviour = behaviour;
UFE.p1Controller.cpuController = UFE.p1SimpleAI;
}
else if (player == 2)
{
UFE.p2SimpleAI.behaviour = behaviour;
UFE.p2Controller.cpuController = UFE.p2SimpleAI;
}
}
Any advice on how to get SimpleAI working? Is the code deprecated with the current 2.0 AI library?