How do I make melee attack in a top down

how do I make melee attack in a top down in wick editor

Easy! You just make a hit-box and a hurt-box.

image

Yellow: Hitbox (what hits other mobs)
Red: Hurtbox (what other mobs hit to hurt you)


for(mob of exampleLayerWithBadMobs) {
  if(this.hitbox.hits(mob.hurtbox)) mob.Health -= 1.5;
}