For Quest: Is there a way to make a container open upon being hit by a certain object?

0 votes
319 views
asked Apr 22 in Authoring by XGeoCookieX

In my quest game I have a crowbar, and I want it so that while playing the game if I hit a container with the crow bar using "hit crate with crowbar" or any similar command. Then the container will open.

1 Answer

+2 votes
answered Apr 22 by The Pixie (121 points)

Quest uses a flag (aka Boolean attribute) called "isopen" to remember the state of a container. Just set the isopen flag on the crate to true in the command. Usde the SetObjectFlag script, and set it up like this:

Set object [flag] [crate] [isopen]

Or in code:

crate.isopen = true
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.
...