How to punch/kick in adventure game? [SOLVED]

Having trouble compiling code? Getting an unexpected error? Player not appearing on screen? Seeking answers on how to do a particular thing? This is the forum you're looking for, to ask other NESmaker users for assistance.
User avatar
PortableAnswers
Posts: 56
Joined: Wed May 02, 2018 11:52 am
Location: USA
Contact:

How to punch/kick in adventure game? [SOLVED]

Post by PortableAnswers » Fri Sep 21, 2018 8:10 pm

Hello, how can I make my player punch or kick in my adventure game? I have the animations and I tried using the Melee_H and Melee_V game objects but no success. Thanks!
Last edited by PortableAnswers on Mon Oct 08, 2018 1:18 pm, edited 1 time in total.
User avatar
jorotroid
Posts: 85
Joined: Wed Aug 08, 2018 7:48 pm
Location: California
Contact:

Re: How to punch/kick in adventure game?

Post by jorotroid » Sat Sep 22, 2018 10:33 am

Can you elaborate on what you have tried doing so far? Punching and kicking could mean different things for different games, so it's hard to give advice when I don't know what sort of punching and kicking your are going for.
User avatar
PortableAnswers
Posts: 56
Joined: Wed May 02, 2018 11:52 am
Location: USA
Contact:

Re: How to punch/kick in adventure game?

Post by PortableAnswers » Mon Sep 24, 2018 11:40 am

jorotroid wrote:
Sat Sep 22, 2018 10:33 am
Can you elaborate on what you have tried doing so far? Punching and kicking could mean different things for different games, so it's hard to give advice when I don't know what sort of punching and kicking your are going for.
Ok, I mean punching and kicking in the sense of a Beat 'Em Up like say Kung Fu Heroes. That game is in the perspective of a traditional top-down adventure game like Zelda but you are more-so kicking and punching like Double Dragon than using a sword like Link.

Thus far, I have been messing around with Melee_H under Game Objects. I have set up my frames, object details (chose player weapon and set speed), and set the bounding box. Then I added the melee script that came with NESmaker to execute when I press B.
User avatar
jorotroid
Posts: 85
Joined: Wed Aug 08, 2018 7:48 pm
Location: California
Contact:

Re: How to punch/kick in adventure game?

Post by jorotroid » Tue Sep 25, 2018 6:52 am

Hm, is anything happening at all when you press B? Can you show a screenshot of the script and also as screenshot of the input editor? Maybe to be thorough also a screenshot of Melee_H's Object Details?
User avatar
jorotroid
Posts: 85
Joined: Wed Aug 08, 2018 7:48 pm
Location: California
Contact:

Re: How to punch/kick in adventure game?

Post by jorotroid » Tue Sep 25, 2018 9:44 am

Oh, I just remember one aspect to the adventure module that you might have skipped. Go into Project>Info and make sure that Weapons 1 and 2 are unlocked. The melee and projectile scripts won't work unless you have those checked.
User avatar
PortableAnswers
Posts: 56
Joined: Wed May 02, 2018 11:52 am
Location: USA
Contact:

Re: How to punch/kick in adventure game?

Post by PortableAnswers » Tue Sep 25, 2018 4:20 pm

jorotroid wrote:
Tue Sep 25, 2018 9:44 am
Oh, I just remember one aspect to the adventure module that you might have skipped. Go into Project>Info and make sure that Weapons 1 and 2 are unlocked. The melee and projectile scripts won't work unless you have those checked.
Yes, someone reminded me of that last night and it worked! ... kind of.
My melee is a sprite of my character doing a kick. When I press B, I see the whole sprite next to my player. It does not replace the player so there are two players on screen. I put the melee sprite right on top of my character with the Game Objects tool for projectiles and melee placement but that did not work.

Thank you for your help thus far! :)
User avatar
jorotroid
Posts: 85
Joined: Wed Aug 08, 2018 7:48 pm
Location: California
Contact:

Re: How to punch/kick in adventure game?

Post by jorotroid » Tue Sep 25, 2018 5:56 pm

You're welcome! I hope we can get this all sorted out for you.

Hm, I think I am getting a better picture of what you are going for. It sounds like your sprite for the kick is a completely redrawn version of you player sprite with body and all. If what you are going for is for the leg your kick to be outside of the normal confines of the size of the player sprite, then you'll want the kick melee sprite to be of just the leg. And with the player set up an animation of the player kicking with the leg cut off.

For a bit of a visual reference check out the gif in this tutorial I made. In it, I am not replacing the entire player object when punching, I am changing the player's state to the attacking animation state and placing an arm object in front of the player.
http://nesmakers.com/viewtopic.php?f=3&t=1018
User avatar
PortableAnswers
Posts: 56
Joined: Wed May 02, 2018 11:52 am
Location: USA
Contact:

Re: How to punch/kick in adventure game?

Post by PortableAnswers » Tue Sep 25, 2018 9:42 pm

jorotroid wrote:
Tue Sep 25, 2018 5:56 pm
You're welcome! I hope we can get this all sorted out for you.

Hm, I think I am getting a better picture of what you are going for. It sounds like your sprite for the kick is a completely redrawn version of you player sprite with body and all. If what you are going for is for the leg your kick to be outside of the normal confines of the size of the player sprite, then you'll want the kick melee sprite to be of just the leg. And with the player set up an animation of the player kicking with the leg cut off.

For a bit of a visual reference check out the gif in this tutorial I made. In it, I am not replacing the entire player object when punching, I am changing the player's state to the attacking animation state and placing an arm object in front of the player.
http://nesmakers.com/viewtopic.php?f=3&t=1018
I think that this is indeed what I need! I will give this a try soon and report back. Thanks!
User avatar
PortableAnswers
Posts: 56
Joined: Wed May 02, 2018 11:52 am
Location: USA
Contact:

Re: How to punch/kick in adventure game?

Post by PortableAnswers » Thu Oct 04, 2018 1:29 am

jorotroid wrote:
Tue Sep 25, 2018 5:56 pm
You're welcome! I hope we can get this all sorted out for you.

Hm, I think I am getting a better picture of what you are going for. It sounds like your sprite for the kick is a completely redrawn version of you player sprite with body and all. If what you are going for is for the leg your kick to be outside of the normal confines of the size of the player sprite, then you'll want the kick melee sprite to be of just the leg. And with the player set up an animation of the player kicking with the leg cut off.

For a bit of a visual reference check out the gif in this tutorial I made. In it, I am not replacing the entire player object when punching, I am changing the player's state to the attacking animation state and placing an arm object in front of the player.
http://nesmakers.com/viewtopic.php?f=3&t=1018
Thanks for the help so far. I followed your tutorial but no luck yet. Yes, my melee sprite is a completely different sprite and not even close to what the walking and idle sprites are.
User avatar
jorotroid
Posts: 85
Joined: Wed Aug 08, 2018 7:48 pm
Location: California
Contact:

Re: How to punch/kick in adventure game?

Post by jorotroid » Thu Oct 04, 2018 1:35 am

Can you share an image of what you are going for?
Post Reply