Jumping to a label/showing screen according to real time (else)?

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
nanashine
Regular
Posts: 129
Joined: Thu Nov 30, 2017 1:44 pm
itch: renpytom
Contact:

Jumping to a label/showing screen according to real time (else)?

#1 Post by nanashine »

I've been using real time on my game to jump to labels, etc, and it's working good.

The problem is when I try using "else". It's not working.

For example:

Code: Select all

    if hour in [17, 18, 19]:
        show screen blue
    else:
        show screen green
If it's 17, 18, 19h it shows the screen normally. But if it's any other time (else), it doesn't show anything.

Did I forget anything in this code? Am I not using it correctly? :oops: :lol:

Thanks :)
I can't access my other account cause I don't remember the e-mail I used *cries in emoji*.

strayerror
Regular
Posts: 159
Joined: Fri Jan 04, 2019 3:44 pm
Contact:

Re: Jumping to a label/showing screen according to real time (else)?

#2 Post by strayerror »

There's nothing obviously wrong with the code you've pasted, so (based on the fact that blue works, and thus hour is probably correct) there's a good chance there's an issue with the green screen.

nanashine
Regular
Posts: 129
Joined: Thu Nov 30, 2017 1:44 pm
itch: renpytom
Contact:

Re: Jumping to a label/showing screen according to real time (else)?

#3 Post by nanashine »

strayerror wrote: Sun Mar 17, 2019 1:36 pm There's nothing obviously wrong with the code you've pasted, so (based on the fact that blue works, and thus hour is probably correct) there's a good chance there's an issue with the green screen.
Thank you! I'll see if there's a problem with the other screen then.
I thought that the "else" was wrong :)
I can't access my other account cause I don't remember the e-mail I used *cries in emoji*.

Post Reply

Who is online

Users browsing this forum: No registered users