Issue with EnteredTrigger

SOSolacex

Member
Hey again,

I am having an issue using the entered trigger task.
This is my behavior tree. Trigger.png

In the Tag field, I've also tried the tag of the trigger object before and the "Other Game Object" being the player gameobject.
However, neither of those worked.

The Trigger object:
Screenshot_18.png

Player DOES have the tag: "Player"

Even though I walk through the trigger with my player character, the task never succeeds
 
You'll want to use conditional aborts to reevaluate the trigger. Take a look at this thread:

 
It already has a conditional abort (lower priority), in fact I even looked at that page before posting this and my tree is basically the same as the one you posted there, except for an additional branch :p

It even has the red circle, indicating that it is being reevaluated, however it just doesn't work.
 
You are using a parallel task instead of a sequence task. Switching it to sequence will allow it to be reevaluated properly.
 
I should have said, I tried it with a sequencer before. However no positive result.

EDIT:

Okay so I tested it out, it only works when the gameobject with said behavior tree enters the trigger.
I.E. I made an agent with this behavior tree walk through the trigger using the seek task and it got triggered.
I made a second agent walk through the trigger using the seek task, which does not have that tree and it didn't get triggered.

So my question is, how do I allow the "Has entered trigger" task to trigger when ANYTHING enters it?
Mainly because I want it to return success when the PLAYER enters a trigger.
 
Last edited:
Ah, yes, that would cause it. Has Entered Trigger is for the behavior tree agent, not for when any object enters any other trigger.

It'll take some scripting in order to do what you're trying to accomplish. You could create a small script which overrides OnTriggerEnter, and then send an event to the behavior tree indicating that the trigger has been entered.
 
Top