Thursday, May 31, 2012

Platforms, Buttons and Triggers by hompy now available on SuperCool Build

/p or /platform [command]
Starts a new platform or enables you to edit them by specifying a command. To build a platform, put down blocks delimiting the size of the floor-- two blocks in opposite corners is sufficient.
   
Press the SNEAK key (V) while in any platform mode to get information about the platform you're looking at. Must be holding spade tool.


command:

new <label>
Starts a new platform with a label already attached.

name <label>

Labels a platform.  It's recommended to name things to avoid mistakes.

height <height>

Forces the platform to raise or lower to the specified height.

freeze

Freezes or unfreezes a platform.  A frozen platform won't move.

destroy
Destroys a platform, removing all of its blocks.


last
When you get asked to select a platform, you can use this command to automatically choose the last platform you selected or created.
 

/b or /button [command]
Starts button creation. Just build a block with the desired color. A default button only has a Press trigger and no actions, so you'll need to make it do something with /action.
   
Press the SNEAK key (V) while in any button mode to get information about the button you're looking at.  Must be holding spade tool.



command:
new <label>
Starts button creation with a label already attached.

name <label>

Labels a button.  It's recommended to name things to avoid mistakes.


toggle
Disables or enables a button.  A disabled button does nothing.


cooldown <seconds>
The button will be able to be activated only once in the specified interval. Default is 0.5 seconds.


destroy
Destroys a button, removing the block.


last 
When you get asked to select a button, you can use this command to automatically choose the last button you selected or created.



/action [command]
Makes a button do something.
  


command:
add <action>
Adds an action to the button. 

set <action>
Deletes all previous actions first, making the new action the only one.

See /trigger for more information on who the "activating players" are.
action:
height  <height> [speed=0.25] [delay]
raise    <amount> [speed=0.25] [delay]
lower    <amount> [speed=0.25] [delay]
elevator <height> [speed=0.75] [delay] [wait=3.0]

Speed determines how fast the platform moves, in seconds.
Delay is the amount of time spent waiting before the platform starts to move.

Elevators can wait an amount of time at the end of the journey, before heading back.

teleport <x y z|where>
Moves the activating player to the specified coordinates. Using 'where' instead takes the last location where you stood and executed the /where command.
           
chat <text>
Sends 'text' to the activating player.  You can put text between quotation marks to allow right justifying with spaces, for example:  "    Hello!"


damage <amount>
Hits the activating players for that many hitpoints.  Use negative numbers to heal.


list
Lists the actions present in the button you select.

Example:
"Actions in 'mybutton': #0 platform 'myplat' height(5) --
#1 player teleport(16, 16, 32)"
           
#0 and #1 are the action indexes to be used with /action delete.  'myplat' is the name of the platform the height action is affecting, in this case making it 5 blocks tall.

delete <#|all>
Delete a single action in a button by specifying its index. Action indexes can be looked up by using /action list.

Negative indexes can be used too: -1 is the last added action, -2 the one before that, and so on.  Specifying 'all' instead of a number erases all the actions.

/t or /trigger <command>
Triggers are what makes a button know when to act and when not to.



command:
add <action>
Adds a trigger to the button.
set <action>
Set deletes all previous triggers first, making the new trigger the only one.

action:
press
Fires when a player normally hits the button with the spade.

distance [radius=3]
True when a player gets within <radius> blocks of the button (note: box distance, not sphere).

track [radius=3]
Same as distance, but tracks one player and only one player. Useful for creating a button that requires a specific number of nearby players.  Multiple buttons are required for multiple players.

height <height>
True when the platform is exactly the specified height.

list
Lists the triggers present in the button you select.

Example:
"Triggers in 'mybutton': #0 player press OR #1 player distance=5 [CHECK]"

#0 and #1 are the trigger indexes to be used with /trigger delete. [CHECK] means the trigger currently yields true. The player in this case is near the button, but hasn't pressed it.

This button uses OR logic, meaning that EITHER of these triggers firing is enough to activate the button.

delete <#|all>
Delete a single trigger in a button by specifying its index. Trigger indexes can be looked up by using /trigger list.

Negative indexes can be used too: -1 is the last added trigger, -2 the one before that, and so on. Specifying 'all' instead of a number erases all the triggers.

logic <and|or>
"AND" will make the button activate when ALL its triggers yield true.
"OR" will make the button activate when ANY of its triggers fire.

quiet
Makes a button become silent or resume playing the animation when it activates.


/save 
Saves all platform and button data to mapname_platform.txt.

Script created by: hompy