Login
Remember
IF Answers
Ask a Question

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

- quest
- programming
- editor

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

## Related questions

- How do you center images in Quest?
- How can I make use of the health variable in Quest through the editor
- How do I find the default parser verbs in Quest?
- In a Gamebook, how do I fix that the text processor is not working properly on my version of Quest (I think)?
- How do I debug in Quest?

...