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

GameMaker Assign a sprite based on input and platform

JeanSwamp

Member
Hello Game Makers!

I'm trying to come up with solutions to change all my input sprites for controller buttons/keyboard keys depending on the platform, so it displays xbox sprites for xbox, ps4 sprites for ps4, keyboard for win/mac, etc.

How do you guys handle this stuff?

Thanks you!
 

Lukan

Gay Wizard Freak
The way I'd handle something like this is to assign them to variables.
Like have a few global variables with basic names such as global.action or global.moveLeft with sprite indexes assigned.
Then at game start determine the system running the game and assign the sprites accordingly.
This is how I handle most things like this and it works out for me pretty well.
 

JeanSwamp

Member
Hey thanks for the reply!

I'm looking for a more elegant way to do it, than just assigning tons of variables.
 
Top