Announcement

Collapse
No announcement yet.

Changing values on blackboard

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Changing values on blackboard

    Hi, I am trying to make a bot with a behavior tree that will either wander, or seek out the player upon sight. I have figured out how to use OnSeePawn and how to make the bot wander, but I can't seem to make it switch between wandering and chasing the player. I have a blackboard, AI controller, and behavior tree set up. Everything seems to be working fine except for my ability to change a Boolean stored in the blackboard that tells the behavior tree when to switch between wandering and chasing. Here is a pic to hopefully assist. I am probably doing something little wrong. Let me know if there are more pictures I could post that would help describe the problem.

    Click image for larger version

Name:	blueprint.jpg
Views:	1
Size:	344.9 KB
ID:	1154551

    #2
    I think your problem is the tick+sequence+gate combination.

    Event tick: Every tick the gate will open and set your bool to false.
    PawnSensing: Every update (depends on sensing interval) when the sensing component is fired the bool will be set to true.

    Combined: Your bool will be false most of the time because tick opens your gate and sets the value to false. Even when your sensing event is fired.


    I dont use PawnSensing but if you wanna work with this component, I would suggest something simple like this:

    Note: The Retriggerable Delay Duration must be slightly greater than the SensingInterval.

    Comment

    Working...
    X