Forum rules - please read before posting.

Avoid loading certain global variables?

edited January 27 in Technical Q&A

I'm doing a level that players will easily die. and they have only 5 chances to challenge it. So, I save the game at the start of the level and load it when they failed. The problem is, I don't know how to remain the 5-chances variable while loading. My game currently is like, no matter how many times they failed, they still have 5 chances.
I used to use a stupid way which is reset all the object states and variables manually via actionlist to simulate the effect of loading, it's really a tough work. there must be an easier way right...?

Comments

  • A Global Variable with its Link to property set to Options Data will cause its value to be saved as part of the active Profile, as opposed to specific save files.

    However, it would be better to reset the scene itself as opposed to saving/loading save files. Instead of manually resetting the states of objects and variables in the scene, the Engine: End game Action's Reset Scene method can be used to clear its current save data.

  • However, it would be better to reset the scene itself as opposed to saving/loading save files. Instead of manually resetting the states of objects and variables in the scene, the Engine: End game Action's Reset Scene method can be used to clear its current save data.

    I put several levels in 1 scene, so I can't reset but only use loading or manually reset via actionlist.
    So.. problem solved 50%, and here's another problem.

    I want to make a Sub Saveslist, so I created another Menu that contains a SavesList, and I saved my game via Save: Save or load: overwrite existing save: save slot index action and then load it, it causes an error:
    Could not load game: file with ID -1 does not exist.

    Does is mean it's not safe using 2 SavesLists?

  • Okay, I found it was a running action blocked my saving action. So, problem solved, thank you Chris!

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.