After dying, the bats were actually supposed to reset their target and return to their original positions. But while trying to implement this, I ended up breaking a lot of things. I couldn’t manage to fix it, and it’s driving me crazy. I hope it didn’t completely ruin the gameplay experience. Still, thank you for taking the time to play.
Viewing post in The Hedgehog jam comments
The resetting worked in some cases (bats that spawn hanging upside-down?) but not all, so you're partway there :) Still sounds like a frustrating bug to squash.
Without knowing how your game is set up, hard to offer any advice. I'd probably track the original spawn position of every enemy and, upon loading at a checkpoint, tell each enemy to reset back to that position in the passive state.
actually I’m not refreshing the whole scene, just a black UI image slowly fades to dark, after moving the player to the checkpoint it slowly becomes transparent again, when I tried to return the bats to their previous state and put their animations back into sleep mode, I saw them flapping frantically inside the walls, the cause of the bug is probably something very simple, however when you are sleepy and under time pressure it can be hard to notice obvious errors :D I’ll take another look at the first opportunity