save and restart

Non-platform specific questions.

save and restart

Postby mrgame » Sat Oct 27, 2007 10:37 pm

i need a way to
(1) RESTART THE GAME
(2) create either a save/load option
(2) or create checkpoitns ( walk over the check point then when u die you go back to there but everything els is the same as then)
eg say i kill a monster and move a box. the box goes back to where it was and the enimy is not dead or perhaps not ever created ect..
mrgame
 
Posts: 118
Joined: Sun Oct 21, 2007 8:09 pm
Location: my computer
Score: 3 Give a positive score

Re: save and restart

Postby Troodon » Thu Nov 29, 2007 8:47 pm

To restart the game, just use the loadGame function from the list in script editor. :D

There is basic save and load function based on one memory slot and advanced save/load based on stuff Sparky is specialised in. Which one you need?

You can create two new variables ,saveX and saveY and calibrate them everytime you collide with a checkpoint. :)
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Re: save and restart

Postby mrgame » Sun Dec 02, 2007 9:01 pm

u see what i wanted was when i touch a checkpoint and die. it reloads the game from that point
everything like health and where the enimys were i need it to actuly load from that point so is it possible?
mrgame
 
Posts: 118
Joined: Sun Oct 21, 2007 8:09 pm
Location: my computer
Score: 3 Give a positive score

Re: save and restart

Postby Troodon » Mon Dec 03, 2007 5:37 am

Yeah, sure! :)
Just save the health and stuff variables just like the coordinate variables.
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Re: save and restart

Postby mrgame » Mon Dec 03, 2007 8:09 pm

im such an idiot why didnt i think of that. thx

it works for most of it but not all of it. ty anyways :)
mrgame
 
Posts: 118
Joined: Sun Oct 21, 2007 8:09 pm
Location: my computer
Score: 3 Give a positive score

Re: save and restart

Postby Troodon » Tue Dec 04, 2007 2:04 pm

:)
What things aren't working?
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Re: save and restart

Postby Bee-Ant » Tue Dec 04, 2007 2:30 pm

Create checkpoints should be no.3... :lol:
To restart the game, use LoadGame function like Mike said...
You could make checkpoints with LoadGame,saveVars and loadVars functions...maybe
make cp variable...(cp=checkpoints),global and save it in a group ("atr" for example)
When player collide with checkpoint1 :
Code: Select all
cp++;
saveVars("data.dat","atr");
LoadGame("MIssion1CheckPoint1.exe");

And destroy checkpoint1 actor when it collided with your player...
In Mission1CheckPoint1 of any character, CreateActor, ScriptEditor
Code: Select all
loadVars("data.dat","atr");

I'm not try it yet...but it should work... :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


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron