Forum rules - please read before posting.

Persisting variables through restore

edited March 2018 in Technical Q&A
I know already this seems on its face like an absurd request, but I would like to persist some variables through a game restore.

Here's a potential case. Let's say there is a Steam achievement I want to give for a certain number of deaths during the game. When you die, the only option you have are to quit or restore. But if you restore, the deaths variable will be zero again. So deaths will never be any more than 1.

I understand and accept that if the player quits the game after dying, there is little that can be done, but if they restore (which they usually will), I would like to keep the value of the variable(s) but restore the entire rest of the game.

Any ideas?

Comments

  • This can be done by linking any such variable to options data, which is a feature of Global Variables.

    See the "Options data" chapter of the Manual as well as this tutorial - essentially this method allows a given variable's value to be linked to the current profile, rather than a save file.
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.