How do I use weapons

Get help using Construct 2

Post » Sun Mar 30, 2014 1:38 am

I've seen some ways of doing this, such as attaching sword to the player and setting the sword's angle.

I don't want to use this method because wouldn't work well in a character with a good resolution, where u can see clearly the details with a bunch of animations.

I thought I could do it using a different animations with weapons and no weapons. For exemple: Idle, idle_Weapon, Running, Running_Weapon, etc...
This way I could explore more the animations quality but then I thought...How do I identify colisions properly if it's all the same thing?So, if I touch the enemy just with the sword, I would take damage.


Thanks
B
56
S
21
G
3
Posts: 602
Reputation: 6,612

Post » Sun Mar 30, 2014 1:45 am

Most of the time we create invisible objects to detect these collisions. Like, when you attack, play the attack animation and create an invisible rectangle where the attack is supposed to hit, and destroy it immediately after.
B
84
S
22
G
15
Posts: 1,039
Reputation: 15,249

Post » Sun Mar 30, 2014 3:13 am

@7Soul

So should I create the object with the same weapon's area and then destroy it when unequip it?
B
56
S
21
G
3
Posts: 602
Reputation: 6,612

Post » Sun Mar 30, 2014 3:49 am

This object should be created as soon as the player attacks, like a flash! Imagine the player punches forward, instead of making an area on the hand that moves forward with it, you want to hit a rectangle in front of the player very fast.

The area that the weapon hits don't need to be precisely the same shape as the weapon. If the area is bigger it gives the player a bit of a safe zone and gives a better feel of the attack
B
84
S
22
G
15
Posts: 1,039
Reputation: 15,249

Post » Sun Mar 30, 2014 4:25 am

@7Soul
I got it. Thanks!

Just for curiosity...According to your example, I'd should create a rectangle in the hand's edge, right?
B
56
S
21
G
3
Posts: 602
Reputation: 6,612

Post » Sun Mar 30, 2014 5:11 am

I'd cover the hand, arm, a few pixels ahead of the hand, and a few pixels on the top and bottom
B
84
S
22
G
15
Posts: 1,039
Reputation: 15,249

Post » Sun Mar 30, 2014 5:51 am

Thanks.
B
56
S
21
G
3
Posts: 602
Reputation: 6,612


Return to How do I....?

Who is online

Users browsing this forum: Elliott, kellehk, Voytek and 32 guests