wesome FPS,
But I would like to see something where you could give the BT something like this
HTML:<Selector FriendlyName="Warrior Combat Behavior" Context="null"> <Selector FriendlyName="Cast Heroic Strike" Context="null"> <Decorator FriendlyName="Check If Enough Rage" Context="Self"> <Selector Object="Player" Conditional="Rage" Logical="Greater" Value="35" Context="Self" FriendlyName="Check to seeif we should cast heroic strike"> <Action ActionType="Spell" Context="Target" ActionName="Heroic Strike" FriendlyName="Cast Heroic Strike"/> </Selector> </Decorator> </Selector> . . . </Selector>
And being able to load and execute this as a behavior tree.
You want a BehaviorTree editor
unfortunately we don't really have time to make one atm but it would indeed be a nice addition.
Looking good FPS
I don't have good coding habits![]()
I'll have to write up a proper explanation on how BTs work, and what each individual piece does in different contexts.
Your comments in the code are very misleading, and some of them are just plain wrong.
I'll have to write up a proper explanation on how BTs work, and what each individual piece does in different contexts. (Returning 'Success' doesn't always start the branch from the top. Take a Sequence for example, it simply moves to the next child.)
As far as BT 'best practices' go; if a decorator takes longer than 5ms to execute, you need to rewrite it. Decorators need to be fast. There's a reason why you can return 'Running' as well as Success/Fail.
Again; I'll have to write up a thread or something on how it all works.