Some people ask about how to make a route available after clearing some point in the story and it's very easy but my question is about something more difficult - how to make a route available after a certain NUMBER of routes cleared, regardless of WHAT those routes are?
Let's say we have six routes and I want one available after clearing ANY three. Now that I mention it, I am a newbie and I understand that this requires understanding and implementing the concept of what "clearing" is in first place, in other words, some manipulations with persistent data which I am not sure are my level now.
But I'd still like to know! Please give the most detailed answer possible because I think it's time for me to learn this stuff.
Thank you in advance!
How to make a route available after certain number of routes cleared
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.
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.
Re: How to make a route available after certain number of routes cleared
Sorry for overly bumping this, but I just remembered something: "clearing" is, of course, means that changes that were made during your first playthrough are preserved in your second, and changes that are made in first and second are preserved in third, etc. It will be a pain in the ass to test, haha. But still, tell me how to do it!
- Ocelot
- Eileen-Class Veteran
- Posts: 1883
- Joined: Tue Aug 23, 2016 10:35 am
- Github: MiiNiPaa
- Discord: MiiNiPaa#4384
- Contact:
Re: How to make a route available after certain number of routes cleared
Well, one way to do it:
Game will remember if you already cleared one route, and, if you cleared at least 2, unlocks fourth route.
Code: Select all
init python:
if persistent.endings is None:
persistent.endings = set()
label start:
menu:
"where do you want to go?"
"movies":
jump movies
"cafe":
jump cafe
"park":
jump park
"those are boring, lets just spend time together" if (len(persistent.endings) >= 2):
jump secret
return
label movies:
"You went to the movies"
if ("movies" in persistent.endings):
"Even thought you were there before"
$ persistent.endings.add("movies")
return
label cafe:
if ("cafe" in persistent.endings):
"Even thought you were there before"
"You went to the cafe"
$ persistent.endings.add("cafe")
return
label park:
if ("park" in persistent.endings):
"Even thought you were there before"
"You went to the park"
$ persistent.endings.add("park")
return
label secret:
"You decided to spend time in company of each other"
$ persistent.endings.add("secret")
return< < insert Rick Cook quote here > >
Re: How to make a route available after certain number of routes cleared
Thank you! That's exactly what I needed!
Who is online
Users browsing this forum: Bing [Bot], Google [Bot], _ticlock_