when dark room lights up, it doesn't show the lit room description.

I am trying to make a flashlight work. whenever i us the flashlight, it says the that it is turned on, but the room doesn't give the description I put for if the room is lit. I am kind of a noob at this, so help me out.


Do you mean that entering look still says it's dark; or that it doesn't show the description until you look?

I assume you have a script set to run when the flashlight is switched on. If you want to show the room description, you'll need to have something like:

msg ("You turn it on.")
this.lightsource = true
ShowRoomDescription

or, if you only want to show the description when you turn it on in a dark room:

wasdark = CheckDarkness()
this.lightsource = true
if (wasdark) {
  msg ("You turn on the torch, illuminating the room.")
  ShowRoomDescription
}
else {
  msg ("You turn it on.")
}

thanks, I am a complete beginner.


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums