Open Actions
Open Actions

Open Actions

Here's where things can get tricky - Open actions are actions that, after it is parsed, accept EVERYTHING after it. The stuff that is typed in is saved to a local variable of the module writer's choosing, where it can be parsed for specific phrases or tokens.

	say open sesame

...where say is the action and open sesame is the target. WARNING: Text that is passed along is sanitized, so what the user literally inputs may not be the exact same thing as what is parsed!


[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.
[LOCAL_CLAUSE] After the list of action names, the keywords uses local are required as well as an identifier that the interpreter uses as the local variable to write what the use typed after the action. NOTE: The input is sanitized to how the interpreter parses text!

Unlike the [NAME_CLAUSE], this is still mandatory.

The following are a few examples of open action declarations:

	action open a_say named "say", "shout" uses local phrase;
	action open a_ask_about named "ask about" uses local topic;

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

Open Actions

Open Actions


Modal Header