How do I only damage enemy on collision ?

1 favourites
  • 4 posts
From the Asset Store
Particles support animations, collisions, effects and etc.
  • I need help understanding how to do melee attacks without main character also taking damage from collision , all my stuff has been projectile attacks but i need to grasp how to do melee collision etc punching , swords

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Usually you have a key to attack and then do player is overlapping enemy, on key pressed : play attack anim, do damage etc.

  • what plinkie said, when u trigger the animation you trigger the damage also towards the enemy if the enemy doesn't have a special status like "defence mode" or to far away...

    instead of overlap tough i would use on collision if u do the damage swing on contact, if you want to have multiple parts of the enemy where you can do more damage... than the arm for example you either need a ragdoll character and set different dmg multipliers for head, arm, torso, legs etc... or use image points and hidden sprites on the character and when the sword hits those you can compare by length of sword over the image point to pick farthest point or closest to the handle and give it more DMG, like a critical hit.

    but for simplicity wise, on key pressed play animation + do dmg to enemy.

  • Many games utilize a set of invisible helper sprites/areas called hitboxes and hurtboxes. This gives you more control over what does damage, as well as when and where. These can be pinned to your visible animations.

    developer.amazon.com/apps-and-games/blogs

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)