Is it possible to run a script to show the room description?

KReed92
29 Jul 2013, 11:30
Hello guys :) I've just signed up here as I am so addicted to Quest at the moment and having a blast creating my current game so I thought I ought to join the party here.

I wondered if anyone can offer a tip on this hopefully minor question I've stumbled into.

My game has a time system in which at night time, all rooms are made dark unless there is a light switched on. So the player enters at night and the room has a simple 'it's too dark to see anything' description with a visible light switch inside of it. When turned on, the light switch makes the room bright, reveals all the objects, etc. as you'd expect and everything runs smoothly.

The problem is that it just makes the objects visible in the objects panel. What I WANT it to do is to run the script/print the room description in the original room description box (the none-dark one) and also provide the usual list of objects and exits.

E.G: This is what it's doing now:
You are in your bedroom. Despite being a room that is familiar to you, it is too dark to see anything.
> press light switch
You press the light switch and the room bursts to life from the glow of the shaded-bulb above you.

This is what I WANT it to do.
You are in your bedroom. Despite being a room that is familiar to you, it is too dark to see anything.
> press light switch
You press the light switch and the room bursts to life from the glow of the shaded-bulb above you.
The room is a perfect square *rest of description here*
You can see... etc.
You can go... etc.

Essentially I want it to 'refresh' the room and show what it would have at the start if the lights were already on or if it was daytime. I could just make it run the script I use for the non-dark description but it obviously won't help with the objects and exists still.

I do apologise for not attaching my game file but hopefully it's not needed as it's not really an error so much as just a script or trick I'm looking for and for privacy reasons I want to keep my game completely under wraps until it is finished. I don't like the idea of people seeing previews/spoilers :) I hope you can understand.

Thank you to anybody who can come up with any idea. x

Pertex
29 Jul 2013, 15:14
After switching on the light you could call the command
HandleSingleCommand("look")

KReed92
29 Jul 2013, 15:41
Thank you SO much! It worked instantly. That was much simpler than I thought/feared it would be. :)

jaynabonne
30 Jul 2013, 08:27
(You can also just call the function ShowRoomDescription.)

Mischko
04 Feb 2014, 15:23
Always nice when you find an existing post that helps you with your problems. Thanks guys.