I am trying to build a section of my game which begins in a dark room. The player can turn on the lights in another room, and thereby gain access to the lit version of the room. I also have a additional variable which sets the room to false, if not visited, and true, if visited, so that if the player returns to the room after they have visited it once, they get a new scene. The conditions for the lights work perfectly, however, when I add the third conditional, which is the visited variable, then I find that the game is just not accepting it. It does not seem to take. I have wondered if for this section I ought to use a point system, but that seems very complicated for something that to me seems small. I have also tried used the elif and else statements, to no avail. I will paste below my code.
Code: Select all
label boxoffice:
if lights == "off":
scene bg box office unlit
with fade
"It's too dark to see in here. I need to turn on the lights."
$ renpy.pause()
jump lobbymenu
if lights == "on":
scene bg box office lit
with fade
"The lights are on."
$ elementstones += 1
$ boxoffice == "true"
$ renpy.pause()
jump lobbymenu
if boxoffice == "true":
scene bg box office nostone
with fade
"It works!"
$ renpy.pause()
jump lobbymenu
For the record, the variables set at the beginning of the game are as follows:
Code: Select all
label start:
$ auditoriumdoors = "closed"
$ elementstones = 0
$ lights = "off"
$ storeroom = "false"
$ boxoffice = "false"
$ salon = "false"