[solved]Weapon contact in animation with enemy

0 favourites
  • 3 posts
From the Asset Store
Be discreet and rescue your friends from behind enemy lines.
  • I have a sprite that includes the sprite with the weapon in hand and attack animation. How do I single out just the weapon on contact with enemy to do damage and not the whole character sprite? Or do I have to remove the weapon from each animation frame and then add the weapon to the character in editor and pin it to the character to make it a separate object?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Pinning the weapon is one way to do this.

    But probably a better solution would be to define an image point on the tip of the weapon (say, sword) and check if this point is overlapping an enemy:

    System-> Pick Enemy overlapping point (character.imagePointX("weapon"), character.imagePointY("weapon"))

  • Pinning the weapon is one way to do this.

    But probably a better solution would be to define an image point on the tip of the weapon (say, sword) and check if this point is overlapping an enemy:

    System-> Pick Enemy overlapping point (character.imagePointX("weapon"), character.imagePointY("weapon"))

    Awesome thank you

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