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 currently trying to call a function which changes a variable. When the time of day is a specific value, I want the location value to change to a certain place.
I have a file initializing the aLoc value, part of it is
init python:
def timeLoc():
global aLoc
if tod == 15:
aLoc = "dining" # <- Here only one = not two ==
On the other hand, it seems that part of the code is missing in the declarations file.
It's better practice to initialize variables with "default". No need "init".