How to use enter as a verb?

Okay so heres the thing as you know Quest has built in verbs that you can't add to an object's list, and give your own code to, in this case enter. I was to make an object in a room, that represents the door to another room so when you select it on the objects and places pane it has the verb enter, and that will move the player to the room the door leads to. But it won't let me use enter as a verb, and every synonym I could think of for it.
I know this can be done some way because I know someone who has a game where you are in a hallway and there are objects for doors, with the option to open them which move you into that room, but I can't figure out how and I would ask them but I have bombarded them with enough questions already and I do need to locate some answers on my own right


Hello.

First, make a backup copy of your game.

Second, drop this into your game in code view, just before the very last line (which is </asl>).

  <verb name="enter_verb">
    <pattern>enter #object#</pattern>
    <property>enter</property>
    <defaultexpression>"You can't enter "+object.article+"."</defaultexpression>
    <scope>notheld</scope>
  </verb>

Now, "enter" will show up when adding a verb to an object:

image


Feel free to add to that pattern, but be careful, because most of the other patterns only make sense on certain objects.


Thank you, but can you elaborate a little more about where to insert the code, like do you mean the code view for the entire game?
and if so how do I access that?


Are you using the desktop version or the online version?


Desktop


Gotcha. Uno momento, por favor...


Adding code in full code view (DESKTOP ONLY)

GIF:

This video loops.


Adding an "enter" verb in the GUI

GIF:

This video loops.


Thanks for the videos I understand not except for one thing which is that's a blank game in the vid, so my view has all the code of my game in it, I know you said paste it just before the , but my game has so much code before it, does it specifically matter where I paste it in the games overall code?


does it specifically matter where I paste it in the games overall code?

Yes. It matters. You could break your game, worst case scenario. It is VERY easy to break your game while fooling around in full code view.

The safest way is to scroll all the way down and insert it just before the </asl>.


Thank you, You were a big help


You're welcome!

Happy to help!


@ Thickar:

http://textadventures.co.uk/forum/quest/topic/mu7itzjqv0yxrkdwgsbmzg/how-to-make-npc-confront-you-with-chioces#46cdb25b-4767-40a6-8bf4-3cd84e805781

I have a guide (see link above, lol) that tries to help explain quest's code structure (aka, the entire game code), that you can take a look at and see if it helps or not. If not, I'd be happy to try and help you get this stuff, if I can... not as good as KV is at helping/explaining, but I'll try at least, lol.


Log in to post a reply.

Support

Forums