game video
also how do I convert the code into my game?, here are some screenshots
Sorry if its too much but I’m a total newbie
Hi,
This is very unspecific. Which code do you mean? What do you want the people in the forum to check in your events?
I would suggest that you try to implement each mechanic one after another. First walking around, second jumping, third primary attack etc. If you get stuck with one mechanic somewhere you could ask in the forum for help for this one thing (not for an entire battle system).
It makes it also easier for everyone if you tell us what you want to do, what you have done so far by posting this part of the events, and what you actually want to achieve.
when I said the code I was meaning the screenshots
also what I want them to do is how do I make a code that can make it similar to the game mechanic of the player character appearing on the video
and what i want to achieve is making the enemy be able to damage the player like when the enemy performs the attack animation a hitbox needs to appear which will cause the player to have knockback damage, same thing goes for the player when he attacks via either by kick or punch a hitbox would appear after the second frame of animation connected to either the punch or the kick?
I can see several things the player can do:
A good starter for some of the things you’ll need are here:
This is not the game you want to make but it can give you some inspiration how to approach making yours.
well I have implemented all what you mentioned except duck also about how they worked well…let this video speak for itself
Okay, that looks all good. So which part gives you trouble?
the part where I have to make the hitbox appear when the player performs the attack
after the second frame of animation
There is a condition current frame. If it is the 3rd frame of your animation (that would be index 2) you can create the hitbox at the point where you need it.
Even at the point where the hit is supposed to be landed?
That should be possible but the question is why you would want to do that? If it is just about dealing damage, then the hitbox (or rather hurtbox in this case) is the object that you will use for checking the collision. You want to attach it to the part of the player (e.g. hands or feet) that is supposed to damage the enemy when in collision. For doing this, you can define a point on your player sprite that is used for attaching the hitbox.
alrighty then my friend this should give me a hand thank you much I appreciate that