-
Notifications
You must be signed in to change notification settings - Fork 104
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
ba.animate giving error #57
Comments
This is a new error check that I added recently; 1.4 used to allow such code to run although it was technically unsafe. Basically what is happening is that certain callbacks such as ba.DroppedMessage run in the middle of the scene simulation step, and at that time it is unsafe to create or destroy nodes or it can lead to crashes. And ba.animate() creates and modifies nodes which is why you hit the error. Using a timer like you have done or simply using ba.pushcall() to defer the animate() until the next loop cycle is the correct workaround here. 👍🏻 In the future I will probably change those callbacks to happen after the simulation step so that such workarounds are unnecessary, but I didn't want to do that now just in case it subtly breaks any game logic. (Don't want to delay 1.5 any more than I already have) |
I'll go ahead and close this. Let me know if you have any more questions about this... |
The ba.animate gives RuntimeError when trying to animate the text node's scale property inside handlemessage function.
The text was updated successfully, but these errors were encountered: