Spellscript blocks
From Hack/Mine Wiki
(Difference between revisions)
(→Activation) |
(Undo revision 1475 by 106.186.29.77 (talk) --Pointless destruction of articles) |
||
Line 1: | Line 1: | ||
'''Spellscript blocks''' are essentially command blocks that can run [[Spellscript]] scripts. They may be placed from the Creative inventory and edited by Ops via right-clicking, which will display the [[Spellscript IDE]]. | '''Spellscript blocks''' are essentially command blocks that can run [[Spellscript]] scripts. They may be placed from the Creative inventory and edited by Ops via right-clicking, which will display the [[Spellscript IDE]]. | ||
− | + | ==Activation== | |
+ | Spellscript blocks may be activated (i.e., have their scripts executed) in several ways, as listed in the table below. The method by which the block is activated is passed to the script as ''int eventType''. | ||
+ | {|class="wikitable" | ||
+ | |- | ||
+ | ! Method || ''eventType'' | ||
+ | |- | ||
+ | | Un-powered by redstone | ||
+ | | 0 | ||
+ | |- | ||
+ | | Powered by redstone | ||
+ | | 1 | ||
+ | |- | ||
+ | | Left-clicked by player | ||
+ | | 2 | ||
+ | |} | ||
+ | |||
+ | In the case of left-clicking, the variable ''Living activator'' will be set to the player; otherwise, it will be ''None''. Additionally, the block's location will be passed in as ''Block block''. |
Revision as of 00:38, 4 February 2014
Spellscript blocks are essentially command blocks that can run Spellscript scripts. They may be placed from the Creative inventory and edited by Ops via right-clicking, which will display the Spellscript IDE.
Activation
Spellscript blocks may be activated (i.e., have their scripts executed) in several ways, as listed in the table below. The method by which the block is activated is passed to the script as int eventType.
Method | eventType |
---|---|
Un-powered by redstone | 0 |
Powered by redstone | 1 |
Left-clicked by player | 2 |
In the case of left-clicking, the variable Living activator will be set to the player; otherwise, it will be None. Additionally, the block's location will be passed in as Block block.