ZCommand

From Wherigo Foundation Wiki
Jump to: navigation, search

A single command. Member of the Commands table of ZCharacter or ZItem. It is presented as a button that the user can click when on the character/item screen.


Properties

Text String Label of the button.
CmdWith Boolean True if you can choose a target for this command, false if the command script is started right away.
Custom Boolean No idea what it means, but it seems to be set to True on all commands.
Enabled Boolean Whether the user can see (and invoke) the command.
EmptyTargetListText String Text that is displayed when the command is intended to be used with a target (CmdWith is true), but no suitable targets are visible.
MakeReciprocal Boolean Only applies when CmdWith is true. When true, this command is automatically listed not only on the item/character where it's defined, but also on all items/characters that can be its targets. There it is listed as ZReciprocalCommand. (This is the default.) When false, the command is only listed on the item/character where it's defined.
WorksWithAll Boolean Whether every object is a target for this command. Only applies when CmdWith is true.
WorksWithList Table A list of ZCharacters and ZItems that are valid targets for this command. Only applies when CmdWith is true.


Events

None


Methods

None, but apparently a you can define a GetEnabled method which is called instead of querying the Enabled property. You can probably define GetWhatever for all properties, but i didn't test that.


Constructor

Wherigo.ZCommand({table})