How to create an unlock flag after story? TTvTT

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
naruto0065
Newbie
Posts: 4
Joined: Wed Oct 08, 2014 12:50 pm
Contact:

How to create an unlock flag after story? TTvTT

#1 Post by naruto0065 »

Hi everyone!
I'm newbie in this and try to figure out how to create an unlock flag after story when you finish a main route.
I've already tried to use global variable and runtime init blocks but it didn't work.
Can anyone help me with this plz?
I'm really appreciate your help. Thank you very much.
P/s: sry for my bad English TTvTT

User avatar
SinSisters
Regular
Posts: 97
Joined: Sat Sep 20, 2014 11:07 am
Completed: The Spanish Privateer
Projects: The Spanish Privateer
Tumblr: sinsisters
itch: sinsisters
Location: Canada
Contact:

Re: How to create an unlock flag after story? TTvTT

#2 Post by SinSisters »

What you want is persistent data (something that will show no matter the save/load). You can check it out here, but I think what you want is something like this:

Code: Select all

#at end of main playthrough
$ persistent.mainpath_completion = True
And let's say you wanted something at the beginning of the game:

Code: Select all

label start:
#this would check and see if the player has already completed the game
if persistent.mainpath_completion:
    "Hey! You already completed the main path! Maybe you'll want to try some others?"
-Nat

naruto0065
Newbie
Posts: 4
Joined: Wed Oct 08, 2014 12:50 pm
Contact:

Re: How to create an unlock flag after story? TTvTT

#3 Post by naruto0065 »

SinSisters wrote:What you want is persistent data (something that will show no matter the save/load). You can check it out here, but I think what you want is something like this:

Code: Select all

#at end of main playthrough
$ persistent.mainpath_completion = True
And let's say you wanted something at the beginning of the game:

Code: Select all

label start:
#this would check and see if the player has already completed the game
if persistent.mainpath_completion:
    "Hey! You already completed the main path! Maybe you'll want to try some others?"
-Nat
thanks bro :D

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot], Ocelot