script to restart the game, help.

Non-platform specific questions.

script to restart the game, help.

Postby havenht » Tue Jul 27, 2010 2:32 pm

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.
havenht
 
Posts: 8
Joined: Mon Jul 26, 2010 6:02 am
Score: 0 Give a positive score

Re: script to restart the game, help.

Postby Bee-Ant » Tue Jul 27, 2010 3:42 pm

Code: Select all
LoadGame("your_project_file_name");

But you can do that only after you export your game :D
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: script to restart the game, help.

Postby havenht » Tue Jul 27, 2010 5:24 pm

hi, thanks , i have try that script already, it work but not too well. is there a better script?
havenht
 
Posts: 8
Joined: Mon Jul 26, 2010 6:02 am
Score: 0 Give a positive score

Re: script to restart the game, help.

Postby Bee-Ant » Tue Jul 27, 2010 5:36 pm

In this case, what's your term of "well" ?
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: script to restart the game, help.

Postby havenht » Tue Jul 27, 2010 6:10 pm

everytime it restart using that script, the game blink. then restart.
havenht
 
Posts: 8
Joined: Mon Jul 26, 2010 6:02 am
Score: 0 Give a positive score

Re: script to restart the game, help.

Postby Bee-Ant » Tue Jul 27, 2010 6:21 pm

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?
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: script to restart the game, help.

Postby havenht » Tue Jul 27, 2010 6:23 pm

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.
havenht
 
Posts: 8
Joined: Mon Jul 26, 2010 6:02 am
Score: 0 Give a positive score

Re: script to restart the game, help.

Postby krenisis » Tue Jul 27, 2010 11:13 pm

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
Tutorial Database for all beginners click this link
viewtopic.php?f=4&t=8680
krenisis
 
Posts: 606
Joined: Sat Jul 25, 2009 3:27 pm
Score: 51 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest