Hey,
is there any way I can achieve the 'RetryUntilSuccessful' loop decorator in a behaviour tree?
What it does is basically keep looping the logic until the node returns SUCCESS
OR
if the loop count is over N.
It's possible to achieve similar effect by having a local variable that keeps track of the failure count
however it can be quite messy if I have multiple instances of it. I will also have to manually reset the value everytime the tree is refreshed.
I was trying to implement on my own by combining LoopCheckDecorator and IResultChangeDecorator but realize IResultChangeDecorator is an internal interface therefore I cannot access it.
[Feature Request] RetryUntilSuccessful decorator
-
- Posts: 12
- Joined: 2025/03/29 09:07
- caitsithware
- 管理人
- Posts: 126
- Joined: 2024/03/26 01:56
Re: [Feature Request] RetryUntilSuccessful decorator
Hello,
It certainly seems like LoopCheckDecorator doesn't provide the functionality you want.
I'll consider changing it to the OnNext(bool result) method.
Thank you for your feedback.
It certainly seems like LoopCheckDecorator doesn't provide the functionality you want.
I'll consider changing it to the OnNext(bool result) method.
Thank you for your feedback.
- caitsithware
- 管理人
- Posts: 126
- Joined: 2024/03/26 01:56
Re: [Feature Request] RetryUntilSuccessful decorator
In Logic Toolkit 1.9.0, we added a bool result argument to the LoopCheckDecorator.OnNext method.
In addition, a Break Condition field has been added to LoopCount, adding the ability to set conditions for exiting a loop.
For more information, refer to LoopCheckDecorator in the manual.
If you have already purchased Logic Toolkit from the Asset Store, you can update to these new features for free.
If you are happy with the updates, please leave a review on the Asset Store.
In addition, a Break Condition field has been added to LoopCount, adding the ability to set conditions for exiting a loop.
For more information, refer to LoopCheckDecorator in the manual.
If you have already purchased Logic Toolkit from the Asset Store, you can update to these new features for free.
If you are happy with the updates, please leave a review on the Asset Store.