Dealing with a light in some rooms

I'm not certain if Quest has anything to deal with a light source.
For example before the player goes into a dark cave then the player needs to have a light source (if a torch then it must be turned on).
Is there some way to make certain locations dark so a light source is needed?

At night the player would need a light source everywhere he goes.


There is a setting for light/darkness. I think you might need to enable it on the 'Features' tab.

A room can have a separate description for when it is dark. Objects can also be set to be "weak" or "strong" light sources. A weak light source can be seen in a dark room (for example the exit from a dark cave), while a strong light source will prevent the room being dark as long as it is visible.

When night falls, you would loop over a list of rooms making them dark (set their dark flag to true)


Hi mrangel

I checked the properties for an object and found
dark (default False)
darklevel (default False)
darkstrength

If I set darklevel to True does that mean Quest for then look at the darkstrength?
can the dark strength be a text word such as "weak"?
I'm not certain what the effect is when setting 'dark' to True does?

In the Features tab the 'Light Dark' option is missing when using on an object.


Just find out that I need to tick the Lightness Darkness in the game options to add that Light Darkness option to an object.


The "Features" tab just controls which options appear in the GUI; so you can see a more meaningful explanation for those attributes.

  • dark (true or false) - "Would this room be dark if the player wasn't carrying a torch?"
  • darklevel (true or false) - "Is this room currently dark?" (automatically adjusted when the player brings a light source into the room)
  • darkdescription (string or script) - Displayed instead of the standard description when darklevel is true.
  • lightsource (true or false) - "Is this object visible in a dark room?"
  • lightstrength (string: "weak" or "strong") - "Is this object bright enough to let you see other objects in the room?"

When a strong light is moved into a room, darklevel is automatically set to false. When the last light is moved out of a room, darklevel is automatically set to the same as dark. (Technicality: this is only done automatically if the player is in the room. If a torch battery runs out while the player isn't present, the room's darklevel won't be corrected until they enter the room - you don't normally care about this, but it's worth knowing if you write a script that checks these values)

If a room's darklevel is true (so dark is true and the player hasn't put a light in there), it will display darkdescription instead of description, and the objects/exits lists will only show objects which have lightsource set to true.

An object has a lightsource attribute (true or false). If this is true and the object's lightstrength attribute is the string "strong", it sets the darklevel of the room it is in to false.


Thanks for the useful information mrangel


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

Support

Forums