Open Rebusmind opened 2 weeks ago
Hi @Rebusmind just spent a little time investigating this, I believe it's caused by the exact same issue as https://github.com/chrismaltby/gb-studio/issues/1644 that you raised earlier. As soon as you start a thread it's causing the script to become unlocked, which is currently needed to allow multiple threads to run at once but has the side effect of causing topdown_update() to run at the same time too. topdown_update()
is responsible for moving the player when your press input (what you saw in 1644) and also for stopping the player animation when no input is pressed (the issue you're seeing here)
To me it seems like there needs to be a way for switching between
Or something that ends up with a similar result. I'll need to have a think how best to achieve this and how to not break any existing projects in the process.
That makes sense. Maybe threads could have a checkbox for this titled "Disable player input"? Might be too abstract, though. And it would have to work with every scene type.
Describe the bug When the player is moved via an actor move event while also a thread is moving another actor, the movement animation is not played.
To Reproduce See this script: When I disable the thread, the player walks normally.
Expected behavior The walking animation should be played even if a thread is running.
Screenshots With the thread running in parallel:
Without thread:
Platform (please complete the following information):
Additional context This only seems to affect the player, other actors can walk at the samt time with no issue.