Login
Remember
IF Answers
Ask a Question

# 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.

- quest

## 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

## Related questions

- Is there a way for me to have collapsed menus on startup in Quest?
- For Quest: Is there a way to create a pause between pages?
- With Flexible Windows by Jon Ingold, is there a way to make the text display at the top of the window, even in Gargoyle? (Inform 7)
- Is there a way to reduce the right margin for a play-in-browser website released by Inform 7?
- Is there any way to paste code into the web version of Quest?

...