help for a newbie

Non-platform specific questions.

help for a newbie

Postby CrazyPotatoInc » Mon Jul 14, 2008 8:36 pm

how do you get games to reset when you win or lose? if you could just post the script, then that would be great. im making the reset button the staples easy button :mrgreen:
"There's a thin line between sanity and it's evil twin.
We're not sure which one we fall into."
-CrazyPotatoInc
Our website is up! (sort of)
http://www.freewebs.com/crazypotato1
CrazyPotatoInc
 
Posts: 11
Joined: Mon Jul 14, 2008 8:21 pm
Score: 0 Give a positive score

Re: help for a newbie

Postby DST » Mon Jul 14, 2008 8:50 pm

the easiest way to reset an entire game (game over) is to use the loadgame(); function;
Just use loadgame(gamename); and the current game will be dumped and reloaded.

You can save previous score etc. and reload it when the game starts using loadVars and saveVars;

Look in the documentation for proper usage of these functions.

Restarting levels on a game requires a little more coding, and you have to create your game with that in mind; ie, actors spawn somewhere in game mode instead of being placed there in editor mode.
It's easier to be clever than it is to be kind.
http://www.lostsynapse.com
http://www.dstgames.com
User avatar
DST
 
Posts: 1117
Joined: Sun Apr 15, 2007 5:36 pm
Location: 20 minutes into the future
Score: 151 Give a positive score

Re: help for a newbie

Postby segwego12 » Mon Jul 14, 2008 10:23 pm

for exe, just put something like domino.exsrhsehrsp, I won't be able to find it and it will reset.
http://www.freewebs.com/primewaregames/

The Primeware Games website

Projects
Era of Rome: Done
segwego12
 
Posts: 167
Joined: Mon Jul 07, 2008 2:48 am
Location: My Website, please come to my website.
Score: 3 Give a positive score

Re: help for a newbie

Postby segwego12 » Mon Jul 14, 2008 10:24 pm

segwego12 wrote:for exe, just put something like domino.exsrhsehrsp, I won't be able to find it and it will reset.

In t he loadgame(); of course. *slaps self*
http://www.freewebs.com/primewaregames/

The Primeware Games website

Projects
Era of Rome: Done
segwego12
 
Posts: 167
Joined: Mon Jul 07, 2008 2:48 am
Location: My Website, please come to my website.
Score: 3 Give a positive score

Re: help for a newbie

Postby segwego12 » Mon Jul 14, 2008 10:25 pm

besides, this should go into support., I think makslane needs to move this.
http://www.freewebs.com/primewaregames/

The Primeware Games website

Projects
Era of Rome: Done
segwego12
 
Posts: 167
Joined: Mon Jul 07, 2008 2:48 am
Location: My Website, please come to my website.
Score: 3 Give a positive score

Re: help for a newbie

Postby Bee-Ant » Wed Jul 16, 2008 9:28 am

DST wrote:the easiest way to reset an entire game (game over) is to use the loadgame(); function;
Just use loadgame(gamename); and the current game will be dumped and reloaded.

You can save previous score etc. and reload it when the game starts using loadVars and saveVars;

Look in the documentation for proper usage of these functions.

Restarting levels on a game requires a little more coding, and you have to create your game with that in mind; ie, actors spawn somewhere in game mode instead of being placed there in editor mode.

agree...
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: help for a newbie

Postby CrazyPotatoInc » Fri Aug 01, 2008 4:41 pm

thanx everyone ill try that.
"There's a thin line between sanity and it's evil twin.
We're not sure which one we fall into."
-CrazyPotatoInc
Our website is up! (sort of)
http://www.freewebs.com/crazypotato1
CrazyPotatoInc
 
Posts: 11
Joined: Mon Jul 14, 2008 8:21 pm
Score: 0 Give a positive score

Re: help for a newbie

Postby Bee-Ant » Sun Aug 24, 2008 6:45 pm

But LoadGame() function only works for exported project.so dont be wondered if it would says "is not valid game" or something when you run your .ged project,export it first to .exe then test your LoadGame() by run that .exe :D


Last bumped by CrazyPotatoInc on Sun Aug 24, 2008 6:45 pm.
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


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron