Ren'Py Using while loops to show different scenes

MTY Games

Newbie
Game Developer
Jan 12, 2019
55
90
Hello all. Hope your lockdown is going wel...

Quick question regarding loops in Renpy.

Is it possible to have a loop that continously checks what time it is, and for example displays the correct image for a certain time of day.

Excuse my lack of code knowledge but I was thinking something like:

Python:
label diningroom_init:

    $ playerlocation = 2

    while playerlocation == 2:

        if hour >= 8 and hour <= 16:
            scene dining_day
        elif hour >= 18 and hour <= 22:
            scene dining_night
        elif hour >= 24 and hour <= 2:
            scene dining_night_off
 

drKlauz

Newbie
Jul 5, 2018
40
24
If all you want is different image for different time then ConditionSwitch would be best here, i think.
 
  • Like
Reactions: MTY Games