-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stop Idle Node Execution #6
Comments
Hey there! I appreciate the in depth explanation of your problem. The problem you are describing is solved by Conditional Aborts. Conditional nodes should run on You can see an example of this in the Example tree included in the project. The enemy AI is set to "wander" throughout the map using a NavMesh. Upon seeing the player, the tree immediately pulls execution to the subtree designed to "chase" the player throughout the map. Note that this conditional will trigger even when the enemy is en route to a destination, thereby demonstrating the interrupt behavior you are describing. It's on my list to improve the documentation and provide a more in depth explanation of this at some point as soon as I have more free time. The error on the LoopUntil modifier is a bug. I'll patch it out when I get the chance. Let me know if you have any other questions! |
Okay, it works. And it works well. I've found my mistake and it does not seem to be possible with the actual logic to handle that. EDIT: It does not work. It is called but it does not have an impact. Look at this: It only works, when the distance is updated before the conditional is checked. Since the DistanceToPlayer Node does not run as long as the Wander Node is in status Running, the distance is not updated and the check fails. It has the last distance before the Wander Node has started. I guess the only way around that is a custom CompareDistance Conditional that takes two transforms and checks the distance and decides to fail or succeed based on the given parameters. Or maybe you have another solution on that? Thank you very much. |
The CompareDistance Evaluate method is called every Tick. Great. But the result does not seem to have any impact. And please have a look at the code: see CompareDistance class
As you can see, it works like your CompareTo code with some small adaptions. I have digged a bit deeper and found some possible reasons for that. However I don't understand the algorithm completely. In ExecutableNode.RunDynamicConditionals the status from
Same with ExecutableNode.DoAction (lines 335-345):
This code also does not run since last context index is same like index. I hope it helps to provide a fix or at least an explanation. :) Thx again |
Thanks again for looking into this! Yes, this seems like a bug; I've managed to reproduce it on my system. I'll work on a fix this weekend. To make sure this thread doesn't get too crowded, I've separated each concern detailed here into other issues: see #7, #8, #9, and #10. To your question about custom conditional logic: yes, creating custom conditionals is the best solution right now since the engine does not allow for concurrent execution. It's something I could look into for a future release. Feel free to reach out if you notice anything else. I'll work on getting these problems fixed in the coming days. |
Thank you very much. I appreciate it a lot! |
Hello again :)
The Idle Node is nice but it's useless for me since there is no way to abort it conditionally.
In the description is stated, that it can be pulled of from the flow by a decorator.
There are no concrete decorators in the code. The only classes that could be a node decorator are the conditionals and the modifiers.
The only modifier that could possibly used is the

LoopUntil
modifier. But for thepublic BlackboardEntrySelector<bool> condition;
I'm getting an error in editor fromBlackboardEntrySelectorDrawer
:in
The Conditionals are not executed on a node that has returned a Running status in the last tick.
The only way to abort a node that is Running (e.g. MoveTo) is to write own custom logic into a new node.
Imagine this situation:
An enemy moves to a position 50 meters away and I walk to him. I'm right in front of him. He just ignores me until he has reached his location. There is no way to handle that problem without coding.
Or did I do misunderstand something ?
Thanks in advance for you help and hopefully explanations. :)
The text was updated successfully, but these errors were encountered: