I am making a boss fight game where the boss goes through multiple phases depending on its health. But when it reaches phase 3, It will use its new attack for a while, then revert back to phase 2. Why is it doing this? PLEASE HELP!!!
1 Like
Neat game! Here’s what I think is happening.
You have this event handler, which kicks in when the boss’s HP reaches 50%:
But then, you also have this running every 10 seconds:
So, if the boss is the in middle of attacking and then moving home while it’s switched to phase 3, then once the boss returns home, it switches back to phase 2.
One way to fix this is to reset the phase only if the boss is still in phase 0. If the boss has transitioned to another phase, then don’t change it.
You’d need to add this if
block in three different places in that on game update every 10000 ms
container.
If you’re still stuck, then just let us know!
1 Like
Thank you so much! This helped alot!
1 Like