Fighting game help

hello, I recently made a code for a boss battle, but if you play through you can see an issue. I would appreciate help on this

1 Like

@codecat1 can you share a link to your game?

1 Like

yes. here it is
[triangle fight ](https://arcade.makecode.com/S38503-12632-30569-05183

1 Like

hmmm, well looking at the code I think your problem is in your attack function. what’s happening is that none of your if/else conditions are being met, so the function isn’t pausing which allows the forever block to immediately call battlestart again.

i’m not sure exactly how you intend this code to work, but my suggestion would be to stop using a forever loop for all of your battle logic and instead use some of the event blocks that arcade has. for example, these two conditions:

image

image

can be implemented by either using a “sprite overlaps” event or an “on A button pressed” event.

hope that helps!

thanks @richard