In this example, transport is a declared attribute.
Take the following grammar:
Code: Select all
verb "climb"
* transport DoClimbTrans
* "up" transport DoClimbUpTrans
* "down" transport DoClimbDownTrans
* "on" transport DoClimbOnTrans
* "on" "board" transport DoBoardTrans
* "off" transport DoClimbOffTrans
* "off" "of" transport DoClimbOffTrans
>climb stairs
>climb on stairs
do work, but
>climb up stairs
>climb down stairs
get the error message beginning with "You haven't encountered anything like that." A global search on "haven't encountered anything" produces no hits. So I'm figuring this is a message from the game engine. However, if I edit the above to:
Code: Select all
verb "climb"
* transport DoClimbTrans
* "xx" transport DoClimbUpTrans
* "xxxx" transport DoClimbDownTrans
* "on" transport DoClimbOnTrans
* "on" "board" transport DoBoardTrans
* "off" transport DoClimbOffTrans
* "off" "of" transport DoClimbOffTrans
>climb xx stairs
>limb xxxx stairs
work correctly.
Is it that the system does not like intermediate words that match other verbs? In writing this i can probably "get around" this by substituting the attribute direction for "up" or "down" and filter it either in DoClimbUp or in the object's before routine to check for the direction being up or down. (And it's probably a good idea to change the name of the routine.)