Private
Optional
_hitPrivate
_hitPrivate
_hitPrivate
_playersPrivate
_stepsThe minimum distance a player must be to click the brick (if it is a clickable brick).
Whether or not the brick is a clickable brick.
If the brick is passable by other players.
The current color of the brick.
If .destroy() has been called on the brick.
The current light color (in hex) of the brick.
If enabled, the brick will emit lighting.
The range of the brick's lighting.
The asset id the brick will appear as.
The name of the brick.
The network id of the brick.
The current position of the brick.
The current rotation of the brick.
The current scale of the brick.
The shape of the brick.
If player.newBrick() is called, a socket is attached to the brick, so the brick changes
will be sent to the player instead of everyone.
The visibility of the brick. (1 = fully visible, 0 = invisible)
Static
brickStatic
Readonly
captureStatic
captureSets or gets the default captureRejection value for all emitters.
Static
defaultStatic
Readonly
errorThis symbol shall be used to install a listener for only monitoring 'error'
events. Listeners installed using this symbol are called before the regular
'error'
listeners are called.
Installing a listener using this symbol does not change the behavior once an
'error'
event is emitted, therefore the process will still crash if no
regular 'error'
listener is installed.
Private
_detectPrivate
_hitCalls the specified callback when a player clicks the brick.
const purpleBrick = world.bricks.find(brick => brick.name === 'purpleBrick')
purpleBrick.clicked((player, secure) => {
if (!secure) return // The server has validated that the player is currently *near* the brick.
console.log(player.username + " clicked this brick!")
})
Identical to setInterval, but will be cleared after the brick is destroyed. Use this if you want to attach loops to bricks, but don't want to worry about clearing them after they're destroyed.
The callback function.
The delay in milliseconds.
Calls the specified callback with the player who touched the brick.
const purpleBrick = world.bricks.find(brick => brick.name === "purpleBrick")
purpleBrick.touching((player) => {
player.kill()
})
Calls the specified callback when a player (who previously touched the brick) steps off of it.
This will fire even if the player dies while touching the brick.
However, if the player leaves the game this will NOT fire.
const purpleBrick = world.bricks.find(brick => brick.name === 'purpleBrick')
purpleBrick.touchingEnded((player) => {
console.log("Get back on that brick!")
})
Static
listenerStatic
onStatic
once
This is used for creating brick objects in Brick Hill.
Example of a brick that can kill players:
Example