Open With...
#1
Posted 02 June 2008 - 10:37 PM
#2
Posted 02 June 2008 - 11:23 PM
2) This is the wrong place for this question. Hence, why you've been reported.
-IMP
#3
Posted 03 June 2008 - 04:18 AM
2) This is the wrong place for this question. Hence, why you've been reported.
Don't worry though, the topic will probably be moved.
Here's a code snip to help you:
Place on create Event of a object,
my_sound=parameter_string(1) sound_replace(sound0,my_sound,3,1) sound_loop(sound0)
If you open an mp3 with your game then, the sound will be loaded and play.
However I get to ask a question as well.
Does anyone know how I can make every sound I open play in the same game window and not open a new game each time?
(I guess a dll would be needed for this)
#4
Posted 03 June 2008 - 04:20 AM
If the game (via a dll) sees that another instance of the game is running, it passes the parameters to the the already older running instance and shuts itself down.
#5
Posted 03 June 2008 - 04:24 AM
Such as: http://gmc.yoyogames...amp;hl=instanceYou'll have to use a dll to check for running copies of your game.
If the game (via a dll) sees that another instance of the game is running, it passes the parameters to the the already older running instance and shuts itself down.
That one
-IMP
#6
Posted 03 June 2008 - 08:32 PM
have on create event...
if (check if the file is already running or what ever..)
{
file_open_write("C:\temp\123.txt")
file_write_string(parameter_string(1))
file_close()
game_end();
}
in step event:
if file_exsists("C:\temp\123.txt")
{
sleep(100) //give it time to write to the file
file_open_read("C:\temp\123.txt")
openstr = file_read_string()
file_close()
file_delete("C:\temp\123.txt")
}
Edited by remoladen, 03 June 2008 - 08:34 PM.
#7
Posted 03 June 2008 - 11:34 PM
Notice I didn't say the only way, I just said the best way. Your method would need to read from a text file every step (including opening it, reading it, then closing it). My way only needs to get a message from the client, which works via the DLL so it's much more efficient than an all-GML method.orrr.... u could have the original exe keep checking a file...
have on create event...
if (check if the file is already running or what ever..)
{
file_open_write("C:\temp\123.txt")
file_write_string(parameter_string(1))
file_close()
game_end();
}
in step event:
if file_exsists("C:\temp\123.txt")
{
sleep(100) //give it time to write to the file
file_open_read("C:\temp\123.txt")
openstr = file_read_string()
file_close()
file_delete("C:\temp\123.txt")
}
-IMP
#8
Posted 04 June 2008 - 05:27 PM
no... it just checks if the file exists every step... therefore it doesn't really do much... I tested it out.. (i fixed up a couple errors in the script) and it worked fine! it didn't even delay my game at all...Notice I didn't say the only way, I just said the best way. Your method would need to read from a text file every step (including opening it, reading it, then closing it). My way only needs to get a message from the client, which works via the DLL so it's much more efficient than an all-GML method.
#9
Posted 11 June 2008 - 05:01 PM
I can't find it tho.
I don't have time to google it for you, but I did find it once, a few weeks ago...
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











