• 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!

Windows PLEASE HELP HOW TO MAKE SPRITE CHANGE BY MOVE

luscaXD

Member
Hello my name is Lucas and im pretty new to GMS2/GML and its being really dificult to learn, since all the tutorials are outdated
i managed to program the basic movement and collision and now im trying to make my sprite change by the direction the player moves, and i dont find any tutorial that work
can you guys help me?
 

chamaeleon

Member
You have not provided any information about how movement direction is defined in your code. Whatever it is though, use it to determine whether image_xscale should have the value 1 (often means looking right) or -1 (looking left). By setting this instance variable to 1 or -1, the sprite will be drawn either as drawn in the sprite editor, or mirrored.
 

Coded Games

Member
We need to see your code. Also this is incredibly basic, just set sprite_index to the sprite you want to use on your keyboard events. Tutorials being out dated shouldn't really affect this. It's still the same code as even a project as old as GM 5 (if not GM1 DND).
 
Top