How do i prevent my player from being damaged by enemies when the exit stage animation is playing?

Hello,
I have an unusual bug that I’ve created in my game, and I was looking into some logic that could prevent this minor problem. So you have to collect 5 keys to open the exit to the level. Once the player comes into contact with the exit, the default controls are being ignored and the player gets tweened into the exit.

However, it still is possible for my player to get damaged. I tried de/activating the default platform behavior instead of ignore default controls, but most of my damage is created by having collisions with objects, so that didn’t fix the problem. I don’t currently have any enemies in a group of any sort. So i was thinking either enemy placement would be the easiest obvious fix. But perhaps I could install a dummy sprite in place of the player when the player touches the exit?

You could add a condition to the collision/damage code that requires less than 5 keys in order for damage to occur.

1 Like

In all events you have that damage your player
Add inverted tween is playing
For tween you use to transition when you get in contact with exit when having 5 keys

1 Like