export resorces from in game
#1
Posted 16 April 2012 - 05:18 AM
thanks for reading
Kelson
#2
Posted 16 April 2012 - 04:00 PM
But seriously, is there any reason you want to make a .gmres file instead of just saving the code and images and using execute_file() or some other custom reading method? If you want it to be compatible with GM, then just save your own .GML files with the code and the images separately.
A .gml file has a simple format:
#script_name /* Code for script_name() goes here */ #other_script /* Code for other_script() goes here */
Etc. for all your scripts.
-IMP
#3
Posted 16 April 2012 - 04:32 PM
I coincidentally was just trying to figure out how to export .gml scripts. I don't quite understand the method however.
Here is what I currently have:
file = file_text_open_write('test_script.gml');
file_text_write_string(file, '#test_script'); file_text_writeln(file);
file_text_write_string(file, "show_message('Example script');");
file_close();Am I on the right track?
#4
Posted 16 April 2012 - 05:10 PM
thanks for the advice. i have already thought of doing that. but it would just be more simple for people to import .gmres into there games. but i can manage with .gml files. but if anyone can tell me how to decode and code a .gmres that would be great.
#5
Posted 17 April 2012 - 07:45 AM
Close, but the last function should be file_text_close(file)IMP,
I coincidentally was just trying to figure out how to export .gml scripts. I don't quite understand the method however.
Here is what I currently have:file = file_text_open_write('test_script.gml'); file_text_write_string(file, '#test_script'); file_text_writeln(file); file_text_write_string(file, "show_message('Example script');"); file_close();
Am I on the right track?
I haven't seen any documentation on the GMRES format, and I believe there's at least some encryption in it; so while I can't help you further, I do wish you luck in your attemptsIceMetalPunk
thanks for the advice. i have already thought of doing that. but it would just be more simple for people to import .gmres into there games. but i can manage with .gml files. but if anyone can tell me how to decode and code a .gmres that would be great.
-IMP
#6
Posted 18 April 2012 - 04:31 PM
#7
Posted 18 April 2012 - 07:36 PM
file = file_text_open_write('test_script.gml');
file_text_write_string(file, '#define test_script');
file_text_writeln(file);
file_text_write_string(file, "show_message('Example script');");
file_text_close(file);
#8
Posted 18 April 2012 - 07:52 PM
hey turngon you need to put define anfter your # like so
file = file_text_open_write('test_script.gml');
file_text_write_string(file, '#define test_script');
file_text_writeln(file);
file_text_write_string(file, "show_message('Example script');");
file_text_close(file);
Ah, thanks Kelson! That should work.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











