-
-
Notifications
You must be signed in to change notification settings - Fork 54
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
Reparenting an agent sets its HSM to inactive #128
Comments
The reason why it happens is these lines: https://github.com/limbonaut/limboai/blob/2c8e0d2da08184051b2729b2eb6c977ab76027f2/hsm/limbo_state.cpp#L188C1-L192C11 It is done in order for a state or a behavior tree in a |
The second issue, I can see what happens. When |
@andmish |
@limbonaut I was checking notifications and found I've tested it, no issues, after reparenting an agent its hsm is still active and no error on reloading scene now. Big thanks! 🤗 |
Thank you both so so much! I was having this exact issue and was trying to get around it by repeatedly calling hsm.set_active(true). This definitely saved a lot of headache. Reparenting doesn't deactivate the state machine now, can also confirm working. |
I had to revert the fix in #226 due to a potential crash on exit in LimboHSM. I implemented an alternative solution in that PR, but it's not ideal. |
Hello!
In running project (Godot 4.2.2 | LimboAI 1.0.2), reparenting an agent (that has LimboHSM) will set that HSM to inactive.
It was working correctly in 1.0.1. So something happened between 1.0.1 >> 1.0.2
Let's say we have such scene:
Agent has such script:
After 2 seconds HSM will be inactive. Basically, reparenting disables AIs 🙂
Other minor issue related to LimboHSM
World has such script for reloading:
Now if we alter Agent's script (so initial state now is another LimboHSM child):
and press R to reload the scene, we will get this error:
It happens only if the current substate is LimboHSM (not LimboState). So if the agent's current state is Idle reloading won't print an error.
Now if we uncomment everything:
it makes it inactive and also prints this error again (15 line is
reparent(new_parent)
):The text was updated successfully, but these errors were encountered: