• 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: How can you upload an image from system and view it in-game?

B

bargari1

Guest
Hi,

Does anyone know if Game Maker Studio have the power to let players choose any image file from their
windows system, to be uploaded to the game and then viewed, or perhaps set as background sprite?

Thanks for answer! Appreciate.
 
P

PHL

Guest
First of all, background and sprite are different things.

Assuming you want a background image, use the function
background_add().

Do this.

my_background=background_add(fill in the correct information),

Then in the room, say:
background_index[0]=my_background;
background_visible [0]=true
 
Look up File Functions in the manual.

For Windows you can get_open_filename() to let the user choose a file on their pc to use.

Then as above you can use background_add, or you can use sprite_add for sprites.
 
Top