-
Saving Game.
I am using the Ini object.
I understand how to save position and counters.
I CAN get it to save.
The only problem is i can only do that in one frame.
My game will have several frames
Possibly over 30.
I want a title screen that can load the game and go to the frame last saved on.
I cant just use the "go to next frame"
So does anyone have enough experience with the Ini to show me how to load to the last frame saved at.
Also my game isn't finished so i can't give you the file to work with.
-
Re: Saving Game.
You can give the "Jump to frame" action an expression - you can use this to take the number out of the INI. If a part of your INI looked like this:
[SaveGroup]
Level=94
...then you could use the GroupItemValue() expression to get the value out of group SaveGroup and item Level. (When you save the game, you could set this item to the current frame number, which I think might be just frame in the expression editor (it'll be in the storyboard controls expressions).
-
Re: Saving Game.
Okay I think i get what you are saying.
Correct me if i'm wrong [which i probably am.].
So you would create group
create item and set value to the current frame number
and that takes care of the saving
so when you load....
Jump to frame
GroupItemValue( "Ini", >Group name<, >Item name<)
With item name being the current frame?
I think i am wrong.
-
Re: Saving Game.
NO:
[SaveGroup]
Level=57
Then use jump to frame
GroupItemValue( "Ini", "SaveGroup", "Level")
-
Re: Saving Game.
So by level you men the frame?
And you just put it the number of the current frame?
by 57 you mean frame 57?
-
Re: Saving Game.
-
Re: Saving Game.
It didnt work.
On the save frame i have the X and Y save
and the frame be saved.
On the menu i have "jump to frame"
with GroupItemValue( "Ini", "SaveGroup", "Level")
and nothing happened.
-
Re: Saving Game.
Copy & Paste the contents of the INI file so we can see why.
-
Re: Saving Game.
heres my file
http://rapidshare.com/files/263825594/JablesAdventure.mfa.html
-
Re: Saving Game.
First off, you need to set the INI file to your INI file with the data. Add this event:
Start of frame: Set current INI file to "data.ini"
to every frame that uses the INI object. You cannot use any INI object expressions, conditions, or actions until you tell the object what file you want it to use. ;)