-
|
I started this on Reddit, but it's perhaps too specific to LimboAI to get help there. For completeness, here is the link to the Reddit post. I am using Godot 4.5.1 with LimboAI 1.5.2 (according to the version.txt). LimboAI does not show up in Godot's addon list, in case that's unexpected. I'm trying to use a dynamic selector to reset behavior if the "target" node of the agent is freed. The tree looks like so:
The code for the "Clear var 'target' if not valid" task: The sequences work for the happy path, but if 2 agents target the same node, one wins and the other causes an exception when trying to access the previously freed node. The LimboAI debugger panel makes it look like the "Clear var 'target' if not valid" task is not running every _tick (but none of them look like that, so it's difficult to tell). There is a recording available at https://youtube.com/watch?v=eP5F6kGbTEw&si=HTI9fOvpKmgXELjo Why doesn't this work as expected? What's the "right" way to short-circuit the running task when it becomes invalid? TIA! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
|
I see that there's a logical error in the example. You should be checking if the instance is NOT valid (missing logical |
Beta Was this translation helpful? Give feedback.
-
|
To check my understanding, I implemented the same tree in another library and it works as expected. IDK enough about LimboAI to know whether it's a fault in my understanding or potentiallly a bug in 1.5.2. |
Beta Was this translation helpful? Give feedback.

To check my understanding, I implemented the same tree in another library and it works as expected. IDK enough about LimboAI to know whether it's a fault in my understanding or potentiallly a bug in 1.5.2.