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

Get help using Construct 2

Post » Thu Sep 18, 2014 11:29 pm

Image
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

Post » 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
62
S
14
G
2
Posts: 286
Reputation: 6,576

Post » 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

Post » Fri Sep 19, 2014 2:10 am

do the characters overlap ever? or are they always a certain distance apart?
B
88
S
29
G
14
Posts: 1,154
Reputation: 15,003

Post » 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

Post » 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
113
S
41
G
20
Posts: 1,586
Reputation: 19,106

Post » 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
42
S
21
G
31
Posts: 685
Reputation: 20,321

Post » 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
83
S
40
G
15
Posts: 993
Reputation: 16,909

Post » 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
88
S
29
G
14
Posts: 1,154
Reputation: 15,003


Return to How do I....?

Who is online

Users browsing this forum: Syazanie Amirin and 9 guests