Icon

File Copy In And Out

Chris Bradel (Chrscool8)

You must be logged in to obtain assets

Description

Easily import files from (or export files to-!) around the Windows file system without being trapped in a sandbox! Works with any file type. Images, text, anything that GameMaker can consume (or output)!

It also writes to the log at the bottom of GameMaker so you can know exactly what's going on!

/----------------/

Example code to add a sprite:

FileCopyIn_Init(); // Run once at the start of the game

FileCopyIn("G:/Documents/Dropbox/logo/8_200x.png", "grabbed_file.png"); // Copy this png file to the local folder and rename to grabbed_file.png (for dealing with files of the same name)

sprite_index = sprite_add("grabbed_file.png", 1, false, false, 0, 0); // Add image to game and set the object's sprite to it!

/----------------/

It's that easy! These files are put in GameMaker's games' temporary directory, so you shouldn't need to worry about cleaning them out. (Manual wipe coming very soon, though.)

You probably won't, but if you should encounter any issue, or would like to request a feature or tweak, please feel free to email me. I will get back to you as quickly as possible.

(Expect Frequent Updates!)

/----------------/

Changelog:

1.0.0: - Initial Release

1.0.1: - Minor Code Change

1.0.2: - Copy function now returns success as a boolean to make it even easier! (See new screenshot) - More debug information printed

1.0.3: - Can Copy Files OUT! - A little extra info added for functions - Example Code added

End User Licence Agreement (EULA).

Age Rating: None

Version

GMS1 - Version 1.0.3. Published August 15, 2014

  • Can Copy Files OUT!
  • A little extra info added for functions
  • Example Code added
Loading, please wait

Package contents

Loading, please wait

What is the issue?

Loading, please wait