Conditions
Conditions are similar to actions and are also leaves in a behavior tree. Condition nodes will execute the evaluator assigned to them and return the result to the caller to determine how they should be processed.
SoldierLogic.lua
:
local function CreateCondition(name, evaluator) local condition = BehaviorTreeNode.new( name, BehaviorTreeNode.Type.CONDITION); condition:SetEvaluator(evaluator); return condition; end