Clickable doors day1 ,day2,etc..,

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
Gopi
Newbie
Posts: 7
Joined: Thu May 14, 2020 10:56 pm
Contact:

Clickable doors day1 ,day2,etc..,

#1 Post by Gopi » Sun May 17, 2020 8:17 am

Hello everyone I'm new Ren'Py coding , I had struck in coding on clickable doors .
I mean my player as room it's day1 he jumped one room to another room and interacted with his roommate here completed day1 conversation , and again when day2 player jumped to one room to another room but here I get a problem day2 getting day1 conversation ...soo please anyone help me.....

OR

if you had any code please share , I will use it in my game with yours name credit , Thank you

User avatar
isobellesophia
Miko-Class Veteran
Posts: 979
Joined: Mon Jan 07, 2019 2:55 am
Completed: None
Projects: Maddox and Friends! (AI Teacher friend), Friendly Universities! (Soon)
Organization: Friendly Teachers series
Deviantart: SophBelle
itch: Child Creation
Location: Philippines, Mindanao
Contact:

Re: Clickable doors day1 ,day2,etc..,

#2 Post by isobellesophia » Sun May 17, 2020 8:36 am

That'll be in use of variables, if, elif and else statement.

Here is an example... i am not sure what you were talking about but here it is.

Code: Select all

default day1 = False
default day2 = False

label start:
"Hello world."

menu:
"door1":
jump door1

"door2" if day1:
jump door2

label day1:
$ day1 = True
"Test"
jump start

label day2:
$ day2 = True
if day1:
"Test"
$ day1 = False
jump start
I am a friendly user, please respect and have a good day.


Image

Image


rayminator
Miko-Class Veteran
Posts: 754
Joined: Fri Feb 09, 2018 12:05 am
Location: Canada
Contact:

Re: Clickable doors day1 ,day2,etc..,

#3 Post by rayminator » Sun May 17, 2020 1:45 pm

you can do it this way as well

this if you using menus

Code: Select all

default day = 0
                menu:
                    "Door 1" if Day == 1:
                        $ day += 1
                        jump day1

                    "Door 2" if Day >= 2 and Day <=4:
                        $ day += 1
                        jump day2

            label day1:
                "Day 1"
            label day2:
                "Day 2"

Post Reply

Who is online

Users browsing this forum: Google [Bot]