Howdy, Stranger!

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

Will variables change on a load? [SC2]

A game I'm working on has taken a bit of a weird turn in that I want to make it episodic as well (updated as time goes on). Now I haven't actually tried this yet as I'm not quite at that point, but am I right in assuming that any variables I set including what episode has been released and the episode you're currently on will be overwritten as soon as the player loads a save (e.g: I've released episode 5, but the user is on ep4 and the game will incorrectly report that the latest episode released is ep4 when they load a save)?

In story init I've got a variable $episode set as 1, but this will increase to 2 when I release the next episode. If the player saves at the end of episode 1 and then reloads at in episode 2 then will the $episode version will still show as 1 despite the fact the game is expanded in version 2?

Is there anyway to set a $variable that won't be saved?

Comments

  • You could use the setup object. For example:
    → In Story JavaScript
    setup.version = 1;
    
    → Or in the StoryInit special passage
    <<set setup.version to 1>>
    


    That said, it sounds like you plan on simply releasing the same project, just with more content. In that case, you're going to run into one of two scenarios: either you haven't invalidated old saves, so you don't really need to track the version at all, or you have, in which case you need to compare the version of the save against the version of the project so you can upgrade the save or whatever you plan to do.
  • Yes I'm releasing the same project, just as ep1, ep2, ep3, etc, because there's way too much for me to code, playtest, and fix any random features that have occurred.

    Annoyingly, my question was probably answered in a previous question I asked, which my son pointed out when I mentioned it to him. I'll probably just do one of the things suggested there, as it effectively allows me to do what I need to do.

    Many thanks.
Sign In or Register to comment.