HyperScript
Docs

← All of the Docs HyperGuard

Where a region is HyperGuard

expressioncenter of guard region <name>HyperGuard

The middle of the region, as a location

send "&7Middle: &f" + center of guard region arg.1
expressionrandom location in guard region <name>HyperGuard

A place inside it: on the ground where the ground is within the region, otherwise on the region's floor. For arenas and for spawning creatures

teleport player to random location in guard region "arena"
expressionsize of guard region <name>HyperGuard

How many blocks it holds

send "&7Blocks: &f" + size of guard region arg.1
expressioncorners of guard region <name>HyperGuard

A list of two locations: its lowest and its highest corner

set {_corners} to corners of guard region arg.1
expressionexpand guard region <name> by <n> blocksHyperGuard

Make it larger on every side; a negative number makes it smaller. Add sideways to leave its height alone

expand guard region arg.1 by arg.2 parsed as number blocks sideways
expressionmove guard region <name> to <location>HyperGuard

Move it so that its middle is there. Its size, owners, members and flags stay

move guard region arg.1 to player's location
Guide and examples
command /arena:
    players only: true
    trigger:
        teleport player to random location in guard region "arena"

command /regioninfo <region>:
    trigger:
        send "&7Middle: &f" + center of guard region arg.1
        send "&7Blocks: &f" + size of guard region arg.1
        set {_corners} to corners of guard region arg.1
        send "&7From &f" + item 1 of {_corners} + " &7to &f" + item 2 of {_corners}

command /grow <region> <blocks:number>:
    permission: "regions.manage"
    trigger:
        expand guard region arg.1 by arg.2 parsed as number blocks sideways
        send "&aDone."

command /bringregion <region>:
    permission: "regions.manage"
    players only: true
    trigger:
        move guard region arg.1 to player's location
SyntaxEffect
center of guard region <name>The middle of the region, as a location
random location in guard region <name>A place inside it: on the ground where the ground is within the region, otherwise on the region's floor. For arenas and for spawning creatures
size of guard region <name>How many blocks it holds
corners of guard region <name>A list of two locations: its lowest and its highest corner
expand guard region <name> by <n> blocksMake it larger on every side; a negative number makes it smaller. Add sideways to leave its height alone
move guard region <name> to <location>Move it so that its middle is there. Its size, owners, members and flags stay
  • Expanding and moving work on box-shaped regions, and within the region's own world.