Difference between revisions of "ZCommand"
From Wherigo Foundation Wiki
Ranger Fox (Talk | contribs) (Created page with "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. == Prop...") |
Ranger Fox (Talk | contribs) m |
||
Line 18: | Line 18: | ||
|WorksWithAll||Boolean||Whether every object is a target for this command. Only applies when CmdWith is true. | |WorksWithAll||Boolean||Whether every object is a target for this command. Only applies when CmdWith is true. | ||
|- | |- | ||
− | |WorksWithList||Table||A list of [[ | + | |WorksWithList||Table||A list of [[ZCharacter]]s and [[ZItem]]s that are valid targets for this command. Only applies when CmdWith is true. |
|} | |} | ||
Latest revision as of 13:33, 22 April 2018
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.
Contents
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})