How to make a game save in a first person point and click

jimm84

  • Posts: 31
Save point and Click -

Hello I was wandering if someone could help. I’m trying to make a simple save function in a game so that when a player clicks ’Save’ from the Menu/Scene It remembers what is left in the inventory and what scene the player was last in – Im happy to stick with just the scene saving at the moment for simplicity. It might also be worth mentioning that this is a first person point and click adventure.

As a heads up, I have also made a game attribute although I having trouble making the scene / list talk to one another should it be a number or a text? I’m a bit confused and having some issues getting my head around this part.

Break down of function :
So, when saved in scene two, remember player is in room two. Load, remembers scene 2.


Any tips?

Thanks :)

JeffreyDriver

  • Posts: 2262
The save/load blocks work on the states of all global (game) attributes, so as long as you've got attributes recording all the required data, it should be quite easy to do.  Once you've loaded the data file you'll need to create some code that will switch to the correct scene.

jimm84

  • Posts: 31
Thank you Jeffrey. I will have a tinker. What would be the best method for the code to load the correct scene? Also with the global attributes, would this store the inventory information? Or would it be wise to make a separate list or attribute for this?

JeffreyDriver

  • Posts: 2262
Once you use the load block, it will automatically load all global attributes. So all long as your inventory items are stored as global attributes, the data will be loaded. Save the current scene name in an attribute then simply recall that when the player clicks a button. E.g a 'continue' button.