punch or any other type of attack

Get help using Construct 2

Post » Sat Jun 09, 2012 6:22 pm

how can i create a character that can perform an attack with a weapon or a punch in beat em up/platform games?
B
9
S
1
Posts: 18
Reputation: 1,147

Post » Sun Jun 10, 2012 12:37 am

First you of course need a character for yourself with attack animations and whatnot. You need to add Image Points for the attack animations where the so-called hitboxes spawn at. The hitboxes are the invisible "bullets" you shoot from your hands, just like in real life (loljk). Then you need to add events that check animation frames. Like, when the attack animation comes to it's impact, check its frame number and set that into the event. Then add an action to spawn your hitbox to your image point.

Next add an event for your enemy to see if it's colliding with the hitbox. If the collision happens, make an action that removes the hitbox (if you are after realistic attacks), substract health from the colliding enemy and play sounds etc.

I can't give any examples since my only fighting game project with stuff like this is quite big already. As long as you've gotten around the logic how conditions, actions, collision and such works you shouldn't have hard times to get this working. Then comes polishing and making it look good. That's another story.

Just a hint: Make the hitbox remove itself after one tic so enemies won't be walking into invisible, floating punches your attacks leave behind. Also adding variables for the hitbox for damage and attack type (for different hit animations etc makes your work easier. Add events for setting the damage and type right after spawning the hitbox to control the power of your attacks.

Whoa, a long post this one... :D
B
15
S
5
G
4
Posts: 214
Reputation: 3,124

Post » Sun Jun 10, 2012 8:50 am

May it'll help you, this is example of my game .

http://dl.dropbox.com/u/52838248/CongPuExample.capx
B
50
S
12
G
7
Posts: 259
Reputation: 10,371

Post » Mon Jun 11, 2012 5:40 pm

thank you both
tomorrow i will try to create something. i'll write for other questions or updates
B
9
S
1
Posts: 18
Reputation: 1,147

Post » Sun Aug 12, 2012 6:21 pm

yago thx

i search for this for the whole life !!^^

u are lifesaver because u ask this question.

thanks hasuak and farsmile

a real lot life saver!!!
B
16
S
3
Posts: 17
Reputation: 1,005

Post » Thu Aug 16, 2012 7:33 pm

how do i make a combo then ?
B
16
S
3
Posts: 17
Reputation: 1,005

Post » Thu Aug 16, 2012 11:27 pm

You can download the sandBOX on the arcade, there have a combo system inside, so, you can use it as reference.

The combo is explained here: http://www.scirra.com/forum/forum_posts.asp?TID=55443&PID=347045&title=how-do-i-press-double-a-to-double-punch#347045
ImageImageImageImageImageImage
B
92
S
19
G
12
Posts: 1,192
Reputation: 18,276

Post » Sat Dec 01, 2012 11:59 pm

[QUOTE=farsmile90] May it'll help you, this is example of my game .

http://dl.dropbox.com/u/52838248/CongPuExample.capx[/QUOTE]
This is brilliant! (been trying to work out how to make a Final Fight style beat em' up and this is a great help)


Especially love the zoomed in slow motion mode, really clever and unique feature.

Good stuff
B
21
S
3
Posts: 1
Reputation: 2,206

Post » Sun Dec 02, 2012 7:59 am

Warch tutorials and practice.
B
40
S
12
G
7
Posts: 603
Reputation: 7,646


Return to How do I....?

Who is online

Users browsing this forum: Colorfish, Waltuo and 4 guests