Pre-release
AdventureJS Docs Downloads
Score: 0 Moves: 0
An overview of working with verbs in AdventureJS. tutorial, about working with verbs

Basic Verb Use:Verb Definitions

The first thing to understand about verbs is that there are verb definitions and there are verb subscriptions. Verbs are defined in the AdventureJS dictionary, and assets must subscribe to verbs in order for the verbs to act on the assets. This document is talking about verb definitions. We offer this information here to provide context for the verb subscription docs that follow, and if you're new to AdventureJS, we recommend that you move on to those.

Each verb definition contains a doTry block that tests whether the verb can be applied in the current circumstances, and a doSuccess block that applies any state changes and prints a message back to the player. Each verb also inherits methods that handle failure states and success states. On the advanced verb pages, we offer a complete example verb.

If you're looking for documentation regarding AdventureJS's predefined verbs, a complete Verb Reference is available. Verb utility functions allow you to enable / disable verbs for all assets, modify verbs, combine verbs, replace verbs, or create new verbs.