Enemies Sprites Freezing

Hello! I’ve been having this issue where whenever my character gets out of their “iframe state” all the current enemies freeze. I’ve tried to fix it with making a new function that makes it so the enemies follow the player, but it doesn’t work. Please Help!

The Game: https://arcade.makecode.com/S98675-78942-37659-68199

When taking damage make the damage taken pause so that the health reduction is paused but not the enemies.

The reason why the enemies stop moving all of a sudden after you get hit is because of the way you implemented the “iframes”. Since you destroy the original sprite that the enemies were following (by giving it a lifespan), they do not have anything else to follow so they stop.

As @NeoStreak said, you can simply just use a pause block in the overlap without using the “iframes” system.

1 Like

For iframes I always use the once every xms block in the timer extension and just adjust that for how long I want the iframe to be