How do I make a sword look like it's perforating a enemy?

  • Title says all, but take this picture above as example.

    I want to make it like the sword is perforating his chest..

  • how about dividing your sword and character, then make an imagepoint on his hand.

    everytime you attack, spawn your sword on that imagepoint in higher layout

  • how about dividing your sword and character, then make an imagepoint on his hand.

    everytime you attack, spawn your sword on that imagepoint in higher layout

    I think you didn't understood what I want... I want to make the sword get "inside" the enemy body!

  • do the characters overlap ever? or are they always a certain distance apart?

  • do the characters overlap ever? or are they always a certain distance apart?

    I think the are always a certain distance apart, but this distance varies...

  • There are two methods I can think of off the top of my head:

    1. Split the enemy vertically into two sprites(left and right sides), one half above the sword, the other below it.

    2. Use a separate sprite for the blade. Using some basic maths, adjust the length of the blade such that it doesn't extend beyond the horizontal center of the enemy sprite.

    Number 1 is the simplest in some respects(no math) and allows the blade to appear out the other side. On the other hand, splitting the enemies like that could complicate other things. Neither one will be truly simple, of course.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I've never tried it before, but since the sword is a light saber style and it looks like it can be stretched, how about creating a image point in the middle of the enemy, than when you attack, set the sword length to reach the image point. If you can't directly access the image point, you could use variables for it.

    If you want to make it appear like the sword comes out from the back, you could create a new object with origin from the imagepoint and give it the same angle as the sword angle.

  • just make a copy of the sword frame, and delete the tip.

    then if you really want to get picky, calculate the distance between the two characters and pick the Long/Medium/Short version of the sword upon impact.

  • yes yes, justifun has it right. Make another animation frame in your sword sprite and take the tip off. Make sure to not loop your sprite "animation" and make the animation speed 0 (since it's not an actual animation). Then swap to the frame without the tip when the sword perforates the enemy.

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