Un-lockable Endings. Possible yah or nah?

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
User avatar
KittyWills
Regular
Posts: 144
Joined: Sun Jun 07, 2015 3:02 pm
Projects: e·phem·er·al, Aeronaut
Organization: KKBGames
Skype: thedeerlord09
Contact:

Un-lockable Endings. Possible yah or nah?

#1 Post by KittyWills » Mon Oct 26, 2015 7:14 pm

This may be way more simple then I'm making it out to be, but I've been searching around for a while and haven't found what I'm looking for.

Is is possible to have a scenario where once you play through and get "ending 1" that on the second play through you now have the option of getting "ending 2". (ie. dramatial murder where you can only play the final arc once you've played each guy's path.)

Now I know to trigger events like this in game, but I'm not sure I can get it to follow through once you've started over again on a new start.

Thanks!

User avatar
Kate
Regular
Posts: 197
Joined: Thu Sep 19, 2013 6:10 pm
Projects: Blackout
Organization: Moonlight Otome
Location: United States
Contact:

Re: Un-lockable Endings. Possible yah or nah?

#2 Post by Kate » Mon Oct 26, 2015 7:37 pm

Read this thread about persistent data:
http://lemmasoft.renai.us/forums/viewto ... ent+ending

This should help :)
Current Project:
Blackout [VN][Romance][GxB][Mystery][Suspense] http://lemmasoft.renai.us/forums/viewto ... 43&t=34118
"It is the duty of authors to make the fantastic seem ordinary and the ordinary seem fantastic." - K. Auer

Sidji972
Regular
Posts: 107
Joined: Tue Jan 21, 2014 8:50 pm
Location: Canada
Contact:

Re: Un-lockable Endings. Possible yah or nah?

#3 Post by Sidji972 » Tue Oct 27, 2015 6:07 am

You can use boolean to make that easier :

Code: Select all

# You can place the script of your game in this file.

$ persistent.ending2_unlocked = False

# Declare images below this line, using the image statement.
# eg. image eileen happy = "eileen_happy.png"

# Declare characters used by this game.
define e = Character('Eileen', color="#c8ffc8")


# The game starts here.
label start:

    e "You've created a new Ren'Py game."

    e "Once you add a story, pictures, and music, you can release it to the world!"

    if persistent.ending2_unlocked:

        menu:
            "Ending 1":
                e "Ending 1"
            "Ending 2":
                e "Ending 2"

    else:

        menu:
            "Ending 1":
                e "Ending 1"
                $ persistent.ending2_unlocked = True


    return

Post Reply

Who is online

Users browsing this forum: Google [Bot]