How do I use the create exit command properly in Quest

0 votes
19 views
asked Oct 7 in Authoring by lightwriter (5 points)

The code I'm using gives me an error when I play my game and doesn't create the exit.

1 Answer

0 votes
answered Oct 9 by The Pixie (121 points)

It would be help to reproduce the error in your post.

Try this:

create exit ("my_new_exit", null, room, second_room, "northdirection")

Notes on the parameters:

mynewexit is a string, the name of the exit. It can be anything you like.

Instead of null for the second parameter, you could have a string here that is the alias of the exit, but it is rarely useful.

room is the location the exit will be in. This is an object, not a string, so no quotes, and if there is no location with this name you will get an error. When the exit is created, the "parent" attribute will get set to this (and you can use null here, and set the "parent" attribute later).

second_room is the location the exit will take the player to. It works just like the previous parameter, but with the "to" attribute.

northdirection is also a string, but has to be the name of an exit type. You can probably guess the alternatives.

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