Game Development Reference
In-Depth Information
Actions
The first node type is a basic action. We can create a wrapper function that will instantiate
an action node and set the internal action accordingly. Actions are only designed to execute
behaviors on an agent and shouldn't be assigned any children. They should be considered
leaves in a behavior tree:
SoldierLogic.lua :
local function CreateAction(name, action)
local node = BehaviorTreeNode.new(
name, BehaviorTreeNode.Type.ACTION);
node:SetAction(action);
return node;
end
Search WWH ::




Custom Search