Is there a way to change a variable when restart button is pressed

i want to know if the player press on the restart button so i can make some changes if he plays it the second time…
anybody knows if there is a way?

How I’d do it depends on your motivations for making the changes. What are you planning?

Personally, if I wanted to offer additional options during a second play-through I’d ask “Is this your first time playing?” I’d add incentives for people not to lie, like having things explained better, and maybe additional scenes, or a few extra stat points to make the game easier for a first time playthrough. Although really if the player wants to lie, so be it I think.

You could do something like password protect the second playthrough, asking them to type in the secret code given at the end of the first time they played, or question them about the name of the villain, or some other important piece of information.

but is there another way instead of just asking? maybe a variable change when restart button pressed?

Short Answer: No. When you hit the restart button it resets all the variables and returns you to the beginning.

hmm well thanks anyway :slight_smile:

what about the play again button at the end does it resets all variables too?
i mean can do somthing there like change a variable or something?


You could probably add a button at the end of the game that route back to the beginning of the game, which should allow you to let them keep their stats or you can set what they start with the next time around. But by default the “Play Again” button does the same thing as “Restart” unless you want to go hacking into CS.

You could just use a custom choice at the end?

  #Play Again retaining Stats
     *goto_scene beginning_scene
  #I'm Finished

thank’s :slight_smile: