This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
cfpython:cfpython [2020/03/04 21:22] meta-aeon [CreateObject] |
cfpython:cfpython [2021/07/27 14:47] (current) partmedia Document Player.Transport |
||
---|---|---|---|
Line 195: | Line 195: | ||
Sets the value the plugin will return to the server when the script exits. Value and effect depend on the event being handled. | Sets the value the plugin will return to the server when the script exits. Value and effect depend on the event being handled. | ||
+ | |||
+ | For "apply" events, ''Crossfire.SetReturnValue(0)'' will cause both the script to run and the item to be applied. ''Crossfire.SetReturnValue(1)'' will instead cause only the script to run - the apply to the item will be intercepted. For example, if a script is attached to a carrot, then ''0'' will run the script and eat the carrot, and ''1'' will run the script without eating the carrot. | ||
==== PluginVersion ==== | ==== PluginVersion ==== | ||
Returns an integer representing the Python plugin version. | Returns an integer representing the Python plugin version. | ||
Line 981: | Line 983: | ||
* **MarkedItem**: ''Crossfire.Object'', item the player has marked. | * **MarkedItem**: ''Crossfire.Object'', item the player has marked. | ||
* **Party**: ''Crossfire.Party'', party in which the player is. Note that changing it bypasses a potential party's password. | * **Party**: ''Crossfire.Party'', party in which the player is. Note that changing it bypasses a potential party's password. | ||
+ | * **Transport**: ''Crossfire.Object'' read-only field for the transport object that the player is currently controlling or aboard | ||
==== CanPay ==== | ==== CanPay ==== |