Jump to content


Make the player import sprites to be used in the game


  • Please log in to reply
1 reply to this topic

#1 Jeldh


    GMC Member

  • New Member
  • 5 posts
  • Version:GM:Studio

Posted 28 March 2016 - 09:00 PM



I'm making a sims-like game where you can dress up your guy in different clothing, which are just png images layered on top of your guy.


Now, i would love to implement a way for the player to import his own created clothes into the game.


Is there a way for the player to add a external image as a sprite to the game? I would love to be pointed in the right direction for a script that makes the player able to open up a "open file" window, browse their computer for their png, and import it. Or is there an easier way?

  • 0

#2 cdrdub8


    GMC Member

  • GMC Member
  • 518 posts
  • Version:GM:Studio

Posted 28 March 2016 - 10:14 PM

Hey there.

Because of how gamemaker studio works and because it has to support many different platform,

it is not recommended to access the device's files.


As such, if you want to be able to show the "open file" dialog, your game will be limited to being exported only to Windows.

( no mobile, no web, no mac, no linux, no nothing else than windows )


You can check out the following scripts to play with windows:






There are more, check the documentation for other options.

As you can see, in the documentation, it says "only for windows":



As for loading images, that's well supported, you can use the sprite_add script from GameMaker.

Make sure you use sprite_collision_mask to set the correct mask of your sprite.


Hope this helps ~

- Cdrdub8

  • 0

I am building awesomeness, wait for it!

Also tagged with one or more of these keywords: gm:studio