Questions about spawning hitboxes

For questions about using Classic.

Post » Tue Jun 21, 2011 7:48 pm

In a platformer I'm designing, I have a few animations for attack. Some 3 frames long, some 4. I was wanting to spawn hitboxes at certain frames in each attack animation. Each of these hitboxes would then, on collision with something in the enemy family, add to it's damage private variable and push them back a x amount of pixels.

I was wondering how would I tell the hitbox to spawn only during certain frames?
B
1
G
1
Posts: 8
Reputation: 466

Post » Tue Jun 21, 2011 8:01 pm

You could try to store your animation frames in variables.
Then ie. if private variable 'animation frame' = 5 spawn your hitbox.
ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

Post » Tue Jun 21, 2011 8:27 pm

There's a condition to compare frames.
Also cant you just alter the collision mask?
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Tue Jun 21, 2011 9:43 pm

Have you seen UberLou's fighter tutorials? There is some really great info on hitboxes in them.

viewtopic.php?f=8&t=6532
B
5
S
1
G
2
Posts: 99
Reputation: 1,575


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 5 guests