save game

Non-platform specific questions.

save game

Postby erfan71 » Sat Jul 21, 2012 7:59 pm

how can we save state of a player in the game?

for example he puts F5 and quick save and then closes the game

and then opens the game presses load game and comes back from last state?

do we must use file?

how?

please help me i am new to Game-Editor.
erfan71
 
Posts: 33
Joined: Sat Jul 21, 2012 8:46 am
Score: 0 Give a positive score

Re: save game

Postby skydereign » Sat Jul 21, 2012 8:12 pm

You should search the forums for saveVars/loadVars tutorials. They're pretty detailed and it'll get you used to searching the forums. To address the question though, you'll need to use the saveVars and loadVars functions. Since you are saving the state of the player, you'll need at least the player's x and y variables. Bee-Ant's checkpoint tutorial can explain most of what you need to do. The only thing you need to add is when you start the game (when the player is created, you call loadVars, and change the player's position to the loaded xy position). http://game-editor.com/forum/viewtopic.php?f=27&t=8744&p=66448&
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: save game

Postby erfan71 » Sat Jul 21, 2012 8:59 pm

ok thanks.
erfan71
 
Posts: 33
Joined: Sat Jul 21, 2012 8:46 am
Score: 0 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest