How do I get the player out of a dark room if he unwittingly enters one without a light source?

0 votes
82 views
asked Aug 25 in Authoring by Robert GAC (3 points)
retagged Aug 25 by Dannii

I can't seem to find any tutorial or documentation that shows how quest handles light.

commented Aug 27 by TM123 (1 point)
In Quest, generally if something is not visible, then it does not exist for practical purposes. This makes a player trapped in a dark room.
The answer to your question is: you would need to write a script.
The script would either need to create a light source, switch the room from dark to light, or transport the player to a lighted room.
commented Aug 28 by hegemonkhan (161 points)
as TM123 already stated, with a bit extra comments of my own:

you can have scripts inside of a global Turnscript or have local Turnscripts for each~all of your dark rooms, which if you get trapped (the scripts check for if there's any lightsource object~exit, a means of lighting up ~ revealing the exit, in the room, and if not...), will rescue you.

-------

as for specifically how to do all of this... maybe I can do it, or maybe it'd be a bit beyond my ability, not sure as I've not tackled~tried it yet, but I just don't have the time, due to school work, but hopefully someone else can help you with it, if you want this method for dealing with possibly getting trapped in a dark room.

1 Answer

0 votes
answered Aug 26 by hegemonkhan (161 points)
selected Aug 27 by Robert GAC
 
Best answer

I've still not worked with the 'light~dark' feature yet, but...

here's the documentation:

http://docs.textadventures.co.uk/quest/functions/index_allfunctions.html
VVVVVV
http://docs.textadventures.co.uk/quest/functions/corelibrary/setdark.html

http://docs.textadventures.co.uk/quest/functions/corelibrary/setlight.html

http://docs.textadventures.co.uk/quest/functions/corelibrary/setobjectlightstrength.html (this is the important one: weak, strong, null~blank~empty)
---- and~or ------
http://docs.textadventures.co.uk/quest/functions/corelibrary/setexitlightstrength.html
(this is the important one: weak, strong, null~blank~empty)

http://docs.textadventures.co.uk/quest/functions/corelibrary/checkdarkness.html


and here's the tutorial, but I'm not sure if it covers the 'light~dark' feature (and am too lazy to look):

http://docs.textadventures.co.uk/quest/tutorial/

commented Aug 28 by hegemonkhan (161 points)
P.S.

there's also a 'lantern' (portable lightsource object) library by Darkweaver, here:

http://forum.textadventures.co.uk/viewtopic.php?f=18&t=4610
This site is now closed.
As of 1st November 2015, this site is a read-only archive. For more information see the intfiction forum post

Welcome to IF Answers, a site for questions and answers about Interactive Fiction.

Technical questions about interactive fiction development tools such as Inform, Twine, Quest, QuestKit, Squiffy, Adrift, TADS etc. are all on-topic here.

Non-technical questions about interactive fiction are also on-topic. These questions could be about general IF design, specific games, entering the IF Comp etc.
...