Transitive actions are actions that require an object in order to perform it. The object just needs to be accessible to the current player (or in the world if no player).
pick up key look at lamp open door
...where key, lamp, and door are names of objects in the module.
action [MODIFIERS] transitive [IDENTIFIER] [NAME_CLAUSE] ;
[MODIFIERS] |
An optional declaration of one or more additional modifiers for action behavior. strict: Apply "strict behavior" to the handling of this action. "Strict" transitive actions do not tolerate additional things typed at the interpreter past a valid parsed object after the action. |
[IDENTIFIER] | An internal identifier that represents this action in the rest of TAMEScript. This is used to find what entry blocks throughout the code should be executed when a name associated with this action is parsed by the interpreter or when a specific action is queued by another command. This identifier must not be used to describe another element. |
[NAME_CLAUSE] |
The keyword named followed by a comma-delimited list of strings that the
interpreter is supposed to associate with this command. The compiler does not check for
name duplicates - equivalent names overwrite their association. Names, internally, are
sanitized to what the interpreter accepts. This clause is optional - if no names are declared, this is not parse-able in the interpreter. Leaving this out is a way to make "private" actions. |
The following are a few examples of transitive action declarations:
action transitive a_kick named "kick";
action transitive a_take named "take", "pick up", "t";
action transitive a_examine named "examine", "look at", "x";
action transitive a_choose named "choose";
action transitive a_assign;
Transitive actions are handled by the object that is targeted, via the onAction() block on that object. If that block does not exist, a different block may be called to handle it.