Last known position behavior

darthbator

New member
How would I go about using the behavior tree asset to go about constructing a reasonable last known position functionality for my enemies?

Generally in code I would want to say something like "when you can no longer see the player cache the last position you saw them at then search around the area for X time"

I think where I'm running into troubles is I don't seem to know how to do things like set timers or detect state changes inside the behavior tree? How can I say "do this branch only for X seconds" or "when this condition is no longer true save this param". Am I thiking about this wrong? Should I be building some unholy tightly coupled union between the behavior trees and the bot class that lives on the enemy? I've been attempting to constrain as much of this AI logic as possible to behavior trees. Thanks!
 
Top