H
heanfry
Guest
yes my title says it. how can i let something be, but only at the first gamestart ever.
Thanks
Thanks
//create event of controller object
_file="startgame.dat";
if not file_exists(_file){
file = file_text_open_write(working_directory+_file);
file_text_write_string(file,"");
file_text_close(file);
// do first start game things
} // i'm creating the flag which i use to check the first
//start of the game
else{
// write here following game starts stuffs
}
That would repeat for every game start. I believe the OP wants to run the code only once ever (barring reinstalls and whatnot of course).An alternate solution could be to use the "gamestart" event. Its meant to execute stuff only one, at game start.
yes, it could be generally useless, but it can be useful if you need to initializate different objects or events, or variables, after the start event. I don't know what are the coder plans about his game, so i added "else" for a matter of completeness.Just to notice, FabioF, "else" in this situation is useless.
There isn't something you want done in later applications but not in first, when taking return and room_goto() in consideration.