• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

My sprite animation isn't working

M

mohammad

Guest
So I am trying to create this game in a physics world.. and although , the moving and standing animation is working, the punching animation isn't.. it doesn't do anything.. it just remains stuck there.. although while moving the player, if i press the button for punching it kinda works.. but I want it to properly work while i am standing.. Before, I used to make games on non-physics world and use some scriptes made by a friend that had some pre-defined values for hspeed or vspeed so all i had to do was write this code for making the animation work while standing which was something like this:
  1. if(!keyboard_check(vk_right) && !keyboard_check(vk_left) && !keyboard_check(vk_up) && !keyboard_check(vk_down) && sprite_index!=spr_player_attack && sprite_index!=spr_player_attack3){
  2. image_speed=12;
  3. sprite_index=spr_player_stand;
  4. }
..but now that i am not using those scripts or hspeed/vspeed at all.. IDK what to do.. please do help.. for moving around or jumping, i am just using X and Y
 
M

Matt Hawkins

Guest
I think it might be your image speed, try setting it to 1 or 0.5 and see if it animates
 
M

Matt Hawkins

Guest
The problem might be in your code then. Please post your code.
 
Top