END GAME IN 1 HOUR
Posts
Pages:
1
I would like to know how to program a simple script that saves the players game, displays a text message and ends the game. I want to be able to save the eclipsed time so the user can keep playing until the timer ends and can't continue after that.
Sincerely,
RPG Maker Developer
Sincerely,
RPG Maker Developer
Engine specification?
Anyway, you could probably store the time left in a variable. I'm sure the option is there, somewhere, in CHANGE VARIABLE. Or whatever it's called. I know you can CALL SAVE MENU, but that doesn't mean players have to save at that point. It highly suggests that they do, but, they can cancel out of it. If there is a way to emulate auto-saves in RPG Maker, I have no clue how to do it.
*Edit: Oh, the text message. Um... SHOW MESSAGE? It should be, like, the first option in the event menu.
*Edit2: Oh, force-quitting. Um... RETURN TO TITLE SCREEN? Might not be exactly what you want, though.
Anyway, you could probably store the time left in a variable. I'm sure the option is there, somewhere, in CHANGE VARIABLE. Or whatever it's called. I know you can CALL SAVE MENU, but that doesn't mean players have to save at that point. It highly suggests that they do, but, they can cancel out of it. If there is a way to emulate auto-saves in RPG Maker, I have no clue how to do it.
*Edit: Oh, the text message. Um... SHOW MESSAGE? It should be, like, the first option in the event menu.
*Edit2: Oh, force-quitting. Um... RETURN TO TITLE SCREEN? Might not be exactly what you want, though.
I found out that RPG Maker XP will quit without any prompt whatsoever if you can manage to exit the "while $scene != nil" loop in the script "Main". (VX Ace might be the same.)
In the script Main, put "$quit_game_immediately = false" after "Class Main", then add " || $quit_game_immediately == false" to the end of "while $scene != nil", then turn $quit_game_immediately to "true" somewhere.
In the script Main, put "$quit_game_immediately = false" after "Class Main", then add " || $quit_game_immediately == false" to the end of "while $scene != nil", then turn $quit_game_immediately to "true" somewhere.
I am guessing you wish to have some sort of demo version, where the player can try the game for 1 hour, then where ever the player is in the story, the player is given one last opportunity to save, and then upon upgrade to full version, he can resume where he left off.
In this case, fairly trivial with events, just one minor gotcha. Don't place your "return to title screen" command immediately after the save screen command, as you will "brick" the save permanently. (The game saves the next command to be executed, as well as the position in the event script.) Instead, you need to do whatever check it is you do for demo, after the save, and decide based off that.
Demo Timer Event page 1, 2. - Make whatever changes you desire, then copy this to every single map. Suggested you remove the sound effect, as I was using it for debugging purposes.
Demo Timer initialization page 1, 2. - Set this to the number of seconds the demo should run for. 1 hour is 3600 seconds. Place this in the starting map.
Finally, put a region ID of 1 in the upper left corner of every map.
Edit: Submitted script. http://rpgmaker.net/scripts/473/
In this case, fairly trivial with events, just one minor gotcha. Don't place your "return to title screen" command immediately after the save screen command, as you will "brick" the save permanently. (The game saves the next command to be executed, as well as the position in the event script.) Instead, you need to do whatever check it is you do for demo, after the save, and decide based off that.
Demo Timer Event page 1, 2. - Make whatever changes you desire, then copy this to every single map. Suggested you remove the sound effect, as I was using it for debugging purposes.
Demo Timer initialization page 1, 2. - Set this to the number of seconds the demo should run for. 1 hour is 3600 seconds. Place this in the starting map.
Finally, put a region ID of 1 in the upper left corner of every map.
Edit: Submitted script. http://rpgmaker.net/scripts/473/
author=Zachary_Braun
I found out that RPG Maker XP will quit without any prompt whatsoever if you can manage to exit the "while $scene != nil" loop in the script "Main". (VX Ace might be the same.)
In the script Main, put "$quit_game_immediately = false" after "Class Main", then add " || $quit_game_immediately == false" to the end of "while $scene != nil", then turn $quit_game_immediately to "true" somewhere.
Easier solution: $scene = nil
Pages:
1















