Variables that don't get reset with a new game?


#1

Is there some form of global variable that I could use? I’m trying to make a game where the player plays through the game once as a human, then has the option of playing through it again as a one of the species of aliens, and each time they play through, they unlock another playable race.


#2

No. But you can work around it.

You could institute a password system that allows someone to play through the different race on their second playthrough.

Or you can fake a new game, but I’d suggest against that.


#3

Agh ok, not the answer I was hoping for, but thanks anyways!


#4

Yeah, unfortunately. It’s a pity that you can’t check to see if people have achievements.

You could also ask them specific questions related to the game content as the password system with a SPOILERS WARNING on it or something.


#5

OK thanks! I’ll try to integrate something like that into it (but I should probably start by creating more than the stat screen) :smile:


#6

Actually, there is the option of doing this with achievements. You can test for achievements in game. Of course achievements don’t stay remembered until it’s built as an app, but if you create placeholders until you’re ready to submit, we can work on that on the end.


#7

I’m not particularly nooby at choicescript, but not sure I understand… How would something like that look?


#8
*achievement foo visible 10 Name
    Description

*check_achievements
*choice
    #Foo
        *achieve foo
        Foo
        *ending
    *if (choice_achieved_foo) #Bar
        FOOBAR!
        *ending

Just dump that in as a test and see how it plays. :slight_smile:


#9

it IS possible I think. It just depends on how simple complex you want it to be.

Option One

You can just not use *ending at the end but have a choice to restart or end session then *set a c_human variable to true and then use *goto_scene beginning and have players continue straight on with a check for *if (c_human) to offer the alien choice.

Option Two

Only offer completion bonuses not full stats and use something similar to a New Game Plus mode. [I used this option in Unnatural]


#10

Thanks! I’ll test it out in a bit!

  • Edit:
    I tested it out, and FairGodfeather’s idea was much more simple (in my mind at least), so I’m gonna stick with that!
    Thanks everyone!