I am having a problem with a lantern in my game. I set it up to be switched on and off and set most of the rooms to start game in darkness. When the game begins, naturally the lanterns illuminates the room. However, if i turn the lantern off, it does not makes the room dark and even moving to other rooms still illuminating rooms.
Could anyone please tell me what am i doing wrong here?
EDIT: And... WOW. There is a much easier way! lol... go figure. Check to make sure you that you run the 'set object brightness script' for your lantern when you turn it off to WEAK and 'set object brightness script' for your lantern to STRONG when you switch it on. That should fix your rooms I think! You may also need to run a script to set your room darkness to dark or light as well. If you want a crappy, unnecessary, and long-winded solution, continue reading! Let me know that the above worked please as I haven't tried it!
I've always had a bit of trouble with 'light sources' in Quest. Most of the time, if a room is dark and needs lit up, I simply make all object visible 'IF' player is carrying the light source AND 'IF' it is turned on. Easy for me because I have few rooms.
In your case, I made three quick rooms.
AddToInventory (flashlight off)
MakeObjectVisible (flashlight on)
MakeObjectInvisible (flashlight off)
SwitchOn (flashlight on)
This will make sure both flashlight objects are in your inventory, swap the on light with the off light.
AddToInventory (flashlight on)
MakeObjectInvisible (flashlight on)
MakeObjectVisible (flashlight off)
SwitchOff (flashlight off)
So that when the flashlight is switched off it reverse step #5.
This may not be the most efficient way to handle it, but it definitely works and you only have to set the drop, take, switch on, switch off scripts one time for each flashlight object.
You might want to look at this tutorial too.
http://textadventures.co.uk/forum/samples/topic/5571/how-to-hande-light-and-darkness
don't know if you already know of it, but there's a 'lantern' library you can take a look at (not sure if it is what you need and/or will even be helpful for you, but meh whatever):
http://textadventures.co.uk/forum/samples/topic/3743/making-a-basic-brass-lantern-that
it may be of use/help for you... or not, lol
I am looking the library, but I guess I will not need nothing too detailed. Using the weak and strong settings shall be enough. Thanks.