Pinning weapon to character and stabbing

Get help using Construct 2

Post » Sat Jun 08, 2013 5:34 pm

Hello, I got a little problem over there.

I have 2 separate sprites: a character and a long stick that player is supposed to hold in both hands and stab when chosen key is pressed.

I don't know how to do it though, because I got some problems. First of all I tried to pin weapon to character but when it comes to stabbing, position of weapon doesn't change (it's supposed to go forward and back then, but it's pinned to character and won't go anywhere so this method won't work).

I also tried to "Set position to another object" every tick and chose image point set to hand but when character starts moving the position of weapon weirdly "delays" and doesn't follow up the image point too precisely..

Help (maybe examples?) would be really, really appreciated, thanks in advance. :)
B
11
S
1
Posts: 76
Reputation: 1,664

Post » Sat Jun 08, 2013 6:42 pm

Does the weapon have to be a separate sprite? Would it be an option to just make 1 sprite and have an animation of the stabbing?
B
6
S
1
Posts: 62
Reputation: 532

Post » Sat Jun 08, 2013 7:00 pm

Yes I want it to be separate sprites because there will be multiple weapons probably.
B
11
S
1
Posts: 76
Reputation: 1,664

Post » Sat Jun 08, 2013 7:15 pm

When the key is pressed the stick gets unpinned, it moves forward, waiting x seconds, then moves backwards again and pin. There is action groups for pinning, unpinning, waiting x seconds and move position.
I hope it helps.
B
11
S
3
G
2
Posts: 15
Reputation: 2,399

Post » Sat Jun 08, 2013 7:20 pm

I know there are such options but when unpinned and attacking while character jumps the weapon stays down under character's last position.
B
11
S
1
Posts: 76
Reputation: 1,664

Post » Sat Jun 08, 2013 7:27 pm

Maybe this will help?
https://www.scirra.com/tutorials/205/making-a-sword-character
Just replace the sword with the stick.HavardFB2013-06-08 19:28:29
B
11
S
3
G
2
Posts: 15
Reputation: 2,399

Post » Sat Jun 08, 2013 8:08 pm

I tried this, but it's still not that because it only changes angle and I need stick to go forward and then back to original position. With pin it is not possible because when attacking and jumping stick stays down as I said and when I try "set position to another object" position of stick weirdly delays and doesn't stick to the image point actually..
B
11
S
1
Posts: 76
Reputation: 1,664

Post » Sat Jun 08, 2013 8:59 pm

Then I dont know, sorry.
B
11
S
3
G
2
Posts: 15
Reputation: 2,399

Post » Sun Jun 09, 2013 12:01 am

Capx or screenshot of events?
B
11
S
2
Posts: 54
Reputation: 805

Post » Sun Jun 09, 2013 6:35 am

If you don't want to use pin, (and are familiar with setting objects to imagepoints) use on Whipping = true -> Set object to image point.

Now you need to go into all of your animations and set the origin for that specific image point. It should stay with you regardless of movement.GenkiGenga2013-06-09 06:35:59
ImageImage
B
108
S
23
G
7
Posts: 1,062
Reputation: 12,683

Next

Return to How do I....?

Who is online

Users browsing this forum: loz666, Mogador, Sumyjkl and 1 guest