G
Gustavo Purificação
Guest
Hi!
I'm from Brazil. I'm not totally fluent in english, but I'll try my best:
I'm working on my very first game (a very simple boxing match). I never coded before but I studied a lot these last couple of weeks and was able to make the basic scope of the game work very well.
I'm happy with it, but since it's my first project I think a lot of what I did was messy and maybe out of place.
I decided to code the player and enemy again from scratch, and keep everything clean.
My first question is:
When a certain button is pressed, player attacks. If I play the sound of the punch at this same event (the movement, not the hit) too, the sound will play even if the player gets punched at the very beggining of the movement (when the punch has actually not been thrown yet).
Is there a way to solve it without giving this task to the step event? I think the first version of the game has too much there.
I'm from Brazil. I'm not totally fluent in english, but I'll try my best:
I'm working on my very first game (a very simple boxing match). I never coded before but I studied a lot these last couple of weeks and was able to make the basic scope of the game work very well.
I'm happy with it, but since it's my first project I think a lot of what I did was messy and maybe out of place.
I decided to code the player and enemy again from scratch, and keep everything clean.
My first question is:
When a certain button is pressed, player attacks. If I play the sound of the punch at this same event (the movement, not the hit) too, the sound will play even if the player gets punched at the very beggining of the movement (when the punch has actually not been thrown yet).
Is there a way to solve it without giving this task to the step event? I think the first version of the game has too much there.