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

Get help using Construct 2

### » Thu Sep 18, 2014 11:29 pm

Title says all, but take this picture above as example.
I want to make it like the sword is perforating his chest..
B
12
S
3
G
1
Posts: 80
Reputation: 2,109

### » Fri Sep 19, 2014 1:40 am

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
"If you want to move a mountain tomorrow, you should start by lifting stones today."
B
68
S
17
G
3
Posts: 293
Reputation: 7,430

### » Fri Sep 19, 2014 1:57 am

puntodamar wrote: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!
B
12
S
3
G
1
Posts: 80
Reputation: 2,109

### » Fri Sep 19, 2014 2:10 am

do the characters overlap ever? or are they always a certain distance apart?
B
103
S
35
G
16
Posts: 1,244
Reputation: 17,240

### » Fri Sep 19, 2014 2:20 am

jobel wrote: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...
B
12
S
3
G
1
Posts: 80
Reputation: 2,109

### » Fri Sep 19, 2014 2:58 am

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.
Moderator
B
115
S
41
G
20
Posts: 1,586
Reputation: 19,196

### » Fri Sep 19, 2014 3:12 am

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.
B
46
S
23
G
31
Posts: 693
Reputation: 20,637

### » Fri Sep 19, 2014 7:01 am

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.
B
92
S
44
G
17
Posts: 1,012
Reputation: 18,607

### » Sat Sep 20, 2014 12:07 am

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.
B
103
S
35
G
16
Posts: 1,244
Reputation: 17,240