Game Development Reference
In-Depth Information
Selectors
Selectors are the first type of nodes that can have children within the behavior tree. A se-
lector can have any number of children, but will only execute the first child that is available
for execution. Essentially, selectors act as if , if…else , and else structures within be-
havior trees. A selector will return true if at least one child node is able to run; otherwise,
the selector returns false:
SoldierLogic.lua :
local function CreateSelector()
return BehaviorTreeNode.new(
"selector", BehaviorTreeNode.Type.SELECTOR);
end
Search WWH ::




Custom Search