Melee help needed

Any way to make melee attacks in makecode? I really need help.

2 Likes

I’m adding melee combat to my game too, and I also had some trouble. I will tell you if I succeed

Depends on what you mean by melee attacks. Can you send the link to your project?

2 Likes

One way which is really common is to send an invisible projectile while animating the player. Another way is to set the projectile velocity to zero and set it to one position and animate the projectile. Hopefully this helps.

this is a very primative method but it gets the job done

when you press a (or whatever you want the attack button to be) you have a check to see if you are overlapping with the enemy and if you are you make it deal damage

1 Like

I mean I just usually do a animation and change some variables and just do overlap on that but that’s probably not the best solution.

1 Like

that’s what I do, and decided not to post it here because it’s kind of janky, and there are much better ways to do it.