00:00
00:00
Newgrounds Background Image Theme

bigrichardrick just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

Saving.

537 Views | 1 Reply

Saving. 2011-06-04 17:07:17


I want to make it so you can save the game and load it to play on like if it is a long game or RPG.

Response to Saving. 2011-06-07 18:36:22


Hope this helps. First, create an INI object. That will save any wanted data. Let's say you want to pick up a weapon. Create a value for the weapon. Name it Owned. (in this example 0 means it's not yours, 1 means it's owned.)
Do the following in the event editor:
-If the player picks up (collide, overlap) the weapon: Set Owned value of weapon to 1.
Under the ini object you should add something like this
-Save button is clicked: Set value (group - item). Then it asks for a group, item and value. Type in "Items" for group, "weapon name" for item, then for value: retrieve data from weapon's Owned value. That's for saving.

If you want to load you should do the opposite.
If you clicks on load button: Retrieve value from ini's "Items" "weapon name".