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.
I'm trying to have a weather icon appear in the top left hand corner of the screen. It changes throughout the game depending on a variable that determines the time of day. Here's the screen for it:
##############################################################################
# Weather Icon
#
# Screen that's used to display the weather icon
screen weather_icon():
showif day1 == True:
imagebutton auto "Design/Calendar1_%s.png" xpos 30 ypos 30 focus_mask True
init -2:
# Make all the journal icon buttons be the same size.
style ji_button:
size_group "ji"
style ji_button_text:
size 65
font "DeterminationSansWeb.ttf"
and in the script, this is when the variable becomes true:
On line 430, you made a typo : $ day1 = "True"
it should be : $ day1 = True
And be aware that player can jump to town from the beginning while the day1 value is still False.
I haven't actually tested your code, so if you get another error, just post it again (or send me your full project via PM if you want me to actually play-test it).
Curious, I fixed the typo and it still doesn't show. I know the day1 value is actually changed to True, because I tested a line of code where a phrase was printed if it was true. For some reason though, the screen is still not showing. I'll PM you the game so you can have a playtest through it yourself, because I'm not sure what to do.
P.S., that menu at the start is for playtesting purposes only to jump ahead to certain sections without skipping through all the dialogue.
You might want to backup your original script before copying these files into your game directory.
And before you launch the game, make sure you delete all persistent first, and do force recompile (or delete your old rpyc if the weather screen still doesn't show up).
I haven't really tested every possible combination of choices, but the new script managed to show the weather icon every time I played the game. For information, I use Renpy 6.99.12.4 on windows XP.