Hookshot-like Help

For questions about using Classic.

Post » Fri Jun 29, 2012 10:22 pm

Hello, how would you go about creating a hookshot-like attack in a side scrolling 2d game when a key is pressed on the keyboard? I know there is topic for this on the Scirra forums, but it is mainly for C2 environment. I would like to know how to do do this in CC environment... Please help.
B
4
Posts: 35
Reputation: 445

Post » Fri Jun 29, 2012 10:28 pm

Something similar to this game called Bravoman.

http://www.youtube.com/watch?v=fRymMqu5aNI

B
4
Posts: 35
Reputation: 445

Post » Tue Jul 03, 2012 5:18 am

Never mind guys I figured it out now.
B
4
Posts: 35
Reputation: 445

Post » Thu Jul 05, 2012 6:33 am

Ah great, how were you able to do it?
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009

Post » Fri Jul 06, 2012 1:56 am

Sure thing bud, So basically I have a Robot Character in my game that can extend it's arms when attack like punch. So what I did is made the frame by frame animation of the punch. have those "punch stretch attack" like animations followed closely by and hit box that plays a "bullet object" form that spawns from the "Player's hit box", that hit box spawning from the player cancels out at the end of the animation once the attack is done.   
B
4
Posts: 35
Reputation: 445

Post » Fri Jul 06, 2012 4:58 am

I'm a little confused. The way You do did it sounds so complicated. In theory all You had to do was make the sprite animation frame by frame. Then play that animation, and check if any enemy object overlaps it.
B
3
G
1
Posts: 70
Reputation: 615

Post » Sat Jul 07, 2012 1:03 am

Not quite @Shindoh, I think he only wanted the attack to count when the enemy was at the end of a punch, and when it was going forward right ChromeGadget?
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009

Post » Sat Jul 07, 2012 4:26 am

[QUOTE=Jayjay] Not quite @Shindoh, I think he only wanted the attack to count when the enemy was at the end of a punch, and when it was going forward right ChromeGadget?[/QUOTE] But even then, if I understand You right, then he could also just check if the last frame of animation is playing, and if any enemy collides with it.
Or if the enemy is colliding with the last frame.right side plus/minus offset to increase the area for hit detection.
Or alternatively just create a hitbox sprite at the desired area; easily with an image point, while the last frame of animation is shown, or for every frame of animation at the fist area.Shindoh2012-07-07 04:27:18
B
3
G
1
Posts: 70
Reputation: 615

Post » Sat Jul 07, 2012 6:24 am

@Jayjay Yes you are right buddy, I did want the attack to count at the end of the punch.

@Shindoh Yea, that would be a less of a hassle with your theory as well. although, when it comes to Players and Enemies performing an attack. I can't help but use separate hitboxes to declare attacks, especially being somewhat of a newbie the Construct.

For example, if you had a rotating "Spike Chain Ball" animation that swing back and forth and you want only the Spike ball of the sprite to effect the Player you would create an hitbox for the Spike Chain ball only.

Now, I know there is a better way of doing a rotating "Spike Chain Ball" but I am using this as an example to explain my answer in a greater detail (I hope) if this was one full on sprite.       
B
4
Posts: 35
Reputation: 445


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 7 guests