Page 1 of 1
script to restart the game, help.
Posted:
Tue Jul 27, 2010 2:32 pm
by havenht
hi, i'm new with ge and c++, is there a script to restart the game after a player die. for game maker program the script is game_restart(); is there one similar to that in c++. thanks.
Re: script to restart the game, help.
Posted:
Tue Jul 27, 2010 3:42 pm
by Bee-Ant
- Code: Select all
LoadGame("your_project_file_name");
But you can do that only after you export your game
Re: script to restart the game, help.
Posted:
Tue Jul 27, 2010 5:24 pm
by havenht
hi, thanks , i have try that script already, it work but not too well. is there a better script?
Re: script to restart the game, help.
Posted:
Tue Jul 27, 2010 5:36 pm
by Bee-Ant
In this case, what's your term of "well" ?
Re: script to restart the game, help.
Posted:
Tue Jul 27, 2010 6:10 pm
by havenht
everytime it restart using that script, the game blink. then restart.
Re: script to restart the game, help.
Posted:
Tue Jul 27, 2010 6:21 pm
by Bee-Ant
havenht wrote:everytime it restart using that script, the game blink. then restart.
That's strange...
Are you sure, you have :
1. changed the "your_project_file_name" into your actual project name? in this case your exported game file name
2. exported your project into windows executable or any other executable?
Re: script to restart the game, help.
Posted:
Tue Jul 27, 2010 6:23 pm
by havenht
also i haven't have a title screen yet, but i think that script will take me to the title screen rather than the beginning of the level. my game will have a title screen in the future, i want when i die in a level, it restart again at that level and not the title screen. and thanks for your reply. i have been looking for the answer on the forum , i think it is more complicated than just one script to make that command.
update*** yeah so i try it ur way, and it work fine, my concern now is if i were to add a title screen, will it take me back to the title screen after i die? if yes, is there a way i can make it restart at the level i die, thank alot.
Re: script to restart the game, help.
Posted:
Tue Jul 27, 2010 11:13 pm
by krenisis
hi and welcome to game editor....I have made sevaral tutorials to help all newbies in step by step fashion. Please refer to the tutorial database its easy and simple located here
viewtopic.php?f=4&t=8680&p=60787