General Actions
General Actions

General Actions

General actions are actions that do not require any additional references to objects or other things in the world in order to do things. General actions are things like:

	look around
	yell
	inventory

...stuff that can just be done to nothing in particular ("yell" is general. "yell at bob" is transitive).

Declaration


	action [MODIFIERS] general [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" general actions do not tolerate additional things typed at the interpreter past the parsed 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 action. 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 general action declarations:


	action general a_quit named "quit";
	action general a_look named "look", "look around", "l";
	action strict general a_yell named "yell";
	action general a_refresh;

General actions are handled by the current room, the current player, or the world, typically via the onAction() block on those elements. If that block does not exist, a different block may be called to handle it.

General Actions

General Actions

×

Modal Header