Plugin : Board

Author:Rex.Rainbow

Download

Properties

Width

  • Initial number of elements on the X axis.

Height

  • Initial number of elements on the Y axis.

Wrap

  • Wrap the logical position.
    • Options : ["No","Yes"]

Infinity

  • Infinity board.
    • Options : ["No","Yes"]

Actions

Add

Action:Add tile

  • Add tile on the board.
    • Tile ( object ) : Tile object.
    • Logic X ( number ) : The X index (0-based) of the tile.
    • Logic Y ( number ) : The Y index (0-based) of the tile.

Action:Add chess

  • Add chess on the board.
    • Chess ( object ) : Chess object.
    • Logic X ( number ) : The X index (0-based) of the chess.
    • Logic Y ( number ) : The Y index (0-based) of the chess.
    • Logic Z ( number or string ) : The Z index of the chess to set. 0 is tile.

Action:Add chess by UID

  • Add chess on the board.
    • UID ( number or string ) : The UID of chess, or a symbol of chess.
    • Logic X ( number ) : The X index (0-based) of the chess.
    • Logic Y ( number ) : The Y index (0-based) of the chess.
    • Logic Z ( number or string ) : The Z index of the chess to set. 0 is tile.

Board

Action:Reset board

  • Reset board to empty.
    • X ( number ) : Initial number of elements on the X axis. 0 is unchanged.
    • Y ( number ) : Initial number of elements on the Y axis. 0 is unchanged.

Action:Set board width

  • Set board width.
    • X ( number ) : Initial number of elements on the X axis. 0 is unchanged.

Action:Set board height

  • Set board height.
    • Y ( number ) : Initial number of elements on the Y axis. 0 is unchanged.

Action:Set wrap mode

  • Set wrap mode.
    • Wrap ( Combo ) : Wrap mode.
      • Options : ["No","Yes"]

Create

Action:Create tile

  • Create tile on the board.
    • Tile ( object ) : Tile object.
    • Logic X ( number ) : The X index (0-based) of the tile.
    • Logic Y ( number ) : The Y index (0-based) of the tile.
    • Layer ( layer ) : Layer name of number.

Action:Create chess

  • Create chess on the board.
    • Chess ( object ) : Chess object.
    • Logic X ( number ) : The X index (0-based) of the chess.
    • Logic Y ( number ) : The Y index (0-based) of the chess.
    • Logic Z ( number or string ) : The Z index of the chess to set. 0 is tile.
    • Layer ( layer ) : Layer name of number.

Action:Create chess above tile

  • Create chess above tile.
    • Chess ( object ) : Chess object.
    • Tile ( object ) : Tile object.
    • Logic Z ( number or string ) : The Z index of the chess to set. 0 is tile.
    • Layer ( layer ) : Layer name of number.

Action:Fill tiles

  • Fill tiles (LZ=0).
    • Tile ( object ) : Tile object.
    • Layer ( layer ) : Layer name of number.

Action:Fill chess

  • Fill chess.
    • Chess ( object ) : Chess object.
    • Layer ( layer ) : Layer name of number.
    • Logic Z ( number or string ) : The Z index (0-based) of the chess.

Action:Create chess above tile by UID

  • Create chess above tile.
    • Chess ( object ) : Chess object.
    • Tile UID ( number or string ) : Tile UID. Can be number or a tile UID list in JSON string.
    • Logic Z ( number or string ) : The Z index (0-based) of the chess to set. 0 is tile.
    • Layer ( layer ) : Layer name of number.

Destroy

Action:Destroy chess

  • Destroy chess and remove them from the board.
    • Chess ( object ) : Chess object.

Layout

Action:Setup layout

  • Setup layout to transfer logic index to physical position.
    • Layout ( object ) : Layout to transfer logic index to physical position

Move

Action:Move chess

  • Move chess on the board.
    • Chess ( object ) : Chess object.
    • Tile ( object ) : Tile object.

Action:Move chess by UID

  • Move chess by UID on the board.
    • Chess UID ( number or string ) : The UID of chess
    • Tile UID ( number or string ) : The UID of tile

Action:Move chess to xyz

  • Move chess on the board.
    • Chess ( object ) : Chess object.
    • Logic X ( number ) : The X index (0-based) of the chess.
    • Logic Y ( number ) : The Y index (0-based) of the chess.
    • Logic Z ( number or string ) : The Z index of the chess to set. 0 is tile.

Action:Move chess to xyz by UID

  • Move chess to xyz index by UID on the board.
    • Chess UID ( number or string ) : The UID of chess
    • Logic X ( number ) : The X index (0-based) of the chess.
    • Logic Y ( number ) : The Y index (0-based) of the chess.
    • Logic Z ( number or string ) : The Z index of the chess to set. 0 is tile.

Action:Swap chess by UID

  • Swap two chess by UID.
    • UID of chess ( number or string ) : UID of chess A.
    • UID of chess ( number or string ) : UID of chess B.

Action:Move chess to z

  • Move chess's LZ on the board.
    • Chess ( object ) : Chess object.
    • Logic Z ( number or string ) : The Z index of the chess to set. 0 is tile.

Action:Move chess to xy

  • Move chess to logic X,Y on the board.
    • Chess ( object ) : Chess object.
    • Logic X ( number ) : The X index (0-based) of the tile.
    • Logic Y ( number ) : The Y index (0-based) of the tile.

Neighbors

Action:Pick neighbor chess

  • Pick neighbor chess.
    • Origin ( object ) : Origin chess.
    • Direction ( number or string ) : Direction of neighbor. (-1) for all directions
    • Neighbor ( object ) : Neighbor chess object for pickking

Pick chess

Action:Pick all chess

  • Pick all chess on the board.

Action:Pick chess

  • Pick chess on board.
    • Chess ( object ) : Chess object.

Pick chess above tiles

Action:Pick chess above tile

  • Pick chess above tile.
    • Chess ( object ) : Chess object.
    • Tile ( object ) : Tile object.

Action:Pick chess above tile UID

  • Pick chess above tile UID.
    • Chess ( object ) : Chess object.
    • Tile UID ( number or string ) : Tile UID. Can be number or a tile UID list in JSON string.

Pick chess by lxyz

Action:Pick chess at Logic X,Y,Z

  • Pick chess at Logic X,Y,Z.
    • Chess ( object ) : Chess object.
    • Logic X ( number ) : The X index (0-based) of the tile.
    • Logic Y ( number ) : The Y index (0-based) of the tile.
    • Logic Z ( number ) : The Z index (0-based) of the tile.

Action:Pick chess at Logic X,Y

  • Pick chess at Logic X,Y.
    • Chess ( object ) : Chess object.
    • Logic X ( number ) : The X index (0-based) of the tile.
    • Logic Y ( number ) : The Y index (0-based) of the tile.

Action:Pick chess at LX

  • Pick chess at Logic X.
    • Chess ( object ) : Chess object.
    • Logic X ( number ) : The X index (0-based) of the tile.

Action:Pick chess at LY

  • Pick chess at Logic Y.
    • Chess ( object ) : Chess object.
    • Logic Y ( number ) : The Y index (0-based) of the tile.

Action:Pick chess at LZ

  • Pick chess at Logic Z.
    • Chess ( object ) : Chess object.
    • Logic Z ( number or string ) : The Z index (0-based) of the tile.

Action:Pick chess inside a square

  • Pick chess inside a square.
    • Chess ( object ) : Chess object.
    • Logic X of left ( number ) : The X index (0-based) of the left tile.
    • Logic X of right ( number ) : The X index (0-based) of the right tile.
    • Logic Y of top ( number ) : The Y index (0-based) of the top tile.
    • Logic Y of bottom ( number ) : The Y index (0-based) of the bottom tile.

Remove

Action:Remove chess

  • Remove chess from the board.
    • Chess ( object ) : Chess object.

Action:Remove chess by UID

  • Remove chess by UID from the board.
    • UID ( number or string ) : The UID of chess

Expressions

Board

Expression:BoardWidth

  • Get board width.

Expression:BoardHeight

  • Get board height.

Chess uid

Expression:LXYZ2UID

  • Get UID by XYZ index. Return (-1) if this position has no chess.
    • X ( number ) : The logic X.
    • Y ( number ) : The logic Y.
    • Z ( number or string ) : The logic Z.

Expression:LZ2UID

  • Get UID by relative UID and Z. Return (-1) if this position has no chess.
    • UID ( number or string ) : The UID of chess.
    • Z ( number or string ) : The logic Z.

Expression:DIR2UID

  • Get neighbor UID by UID and direction. Add 3rd parameter to indicate z-index. Return (-1) if no chess picked.
    • UID ( number or string ) : The UID of origin chess.
    • Direction ( number or string ) : The direction.

Expression:PXY2UID

  • Get UID by physical X,Y co-ordinate. Add 3rd parameter to indicate z-index. Return (-1) if no chess picked.
    • X ( number ) : The physical X.
    • Y ( number ) : The physical Y.

Empty

Expression:EmptyLX

  • Get X co-ordinate of an empty cell under "Condition:Pick an empty cell". or "Condition:Has any empty cell".

Expression:EmptyLY

  • Get Y co-ordinate of an empty cell under "Condition:Pick an empty cell". or "Condition:Has any empty cell".

For Each LZ

Expression:CurLZ

  • Get the current logic Z index in a For Each loop.

For Each cell

Expression:CurLX

  • Get the current logic X index in a For Each loop.

Expression:CurLY

  • Get the current logic Y index in a For Each loop.

Layout

Expression:DirCount

  • Get count of directions.

Logic

Expression:UID2LX

  • Get X index of chess by UID. Return (-1) if the chess is not on the board.
    • UID ( number or string ) : The UID of chess.

Expression:UID2LY

  • Get Y index of chess by UID. Return (-1) if the chess is not on the board.
    • UID ( number or string ) : The UID of chess.

Expression:UID2LZ

  • Get Z index of chess by UID. Return (-1) if the chess is not on the board.
    • UID ( number or string ) : The UID of chess.

Expression:UID2LA

  • Get Logic angle by UID, in degree. (-1) is invalid angle.
    • Origin ( number or string ) : The UID of chess at origin.
    • FaceTo ( number or string ) : The UID of chess to face.

Expression:UID2ZCnt

  • Get z count at select chess by UID. Return 0 if the chess is not on the board.
    • UID ( number or string ) : The UID of chess.

Expression:LXY2ZCnt

  • Get z count at logic X,Y index. Return 0 if this position does not exist.
    • X ( number ) : The logic X.
    • Y ( number ) : The logic Y.

Expression:PXY2LX

  • Get logic X by physical X,Y co-ordinate.
    • X ( number ) : The physical X.
    • Y ( number ) : The physical Y.

Expression:PXY2LY

  • Get logic Y by physical X,Y co-ordinate.
    • X ( number ) : The physical X.
    • Y ( number ) : The physical Y.

Expression:LogicDistance

  • Get logic distance of two chess. Return (-1) if one of chess is not on the board.
    • UID ( number or string ) : The UID of chess A.
    • UID ( number or string ) : The UID of chess B.

Expression:NeigborUID2DIR

  • Get logic direction of two neighbor chess from chess A to chessB. Return (-1) if they are not on the board.
    • UID ( number or string ) : The UID of chess A.
    • UID ( number or string ) : The UID of chess B.

Max-min

Expression:MaxLX

  • Get maximum of LX of all chess.

Expression:MaxLY

  • Get maximum of LY of all chess.

Expression:MinLX

  • Get minimum of LX of all chess.

Expression:MinLY

  • Get minimum of LY of all chess.

Neighborhood

Expression:ALLDIRECTIONS

  • Direction code for all directions (-1), used in "Condition: Pick neighbor chess".

Physical

Expression:LXY2PX

  • Get physical X co-ordinate by logic X,Y index. Return (-1) if this position does not exist.
    • X ( number ) : The logic X.
    • Y ( number ) : The logic Y.

Expression:LXY2PY

  • Get physical Y co-ordinate by logic X,Y index. Return (-1) if this position does not exist.
    • X ( number ) : The logic X.
    • Y ( number ) : The logic Y.

Expression:UID2PX

  • Get X co-ordinate by UID. Return (-1) if the chess is not on the board.
    • UID ( number or string ) : The UID of chess.

Expression:UID2PY

  • Get Y co-ordinate by UID. Return (-1) if the chess is not on the board.
    • UID ( number or string ) : The UID of chess.

Expression:LXYZ2PX

  • Get physical X co-ordinate by logic X,Y,Z index.
    • X ( number ) : The logic X.
    • Y ( number ) : The logic Y.
    • Z ( number or string ) : The logic Z.

Expression:LXYZ2PY

  • Get physical Y co-ordinate by logic X,Y,Z index.
    • X ( number ) : The logic X.
    • Y ( number ) : The logic Y.
    • Z ( number or string ) : The logic Z.

Expression:PXY2NearestPX

  • Get nearest X co-ordinate of cell from physical position.
    • X ( number ) : The physical X.
    • Y ( number ) : The physical Y.

Expression:PXY2NearestPY

  • Get nearest Y co-ordinate of cell from physical position.
    • X ( number ) : The physical X.
    • Y ( number ) : The physical Y.

Conditions

Board

Condition:Point is in board

  • Testing if point is in board.
    • X ( number ) : The Physical X.
    • Y ( number ) : The Physical Y.

Condition:On the board

  • Return true if the chess is on the board.
    • Chess ( object ) : Chess object.

Empty

Condition:Is occupied

  • Testing if cell is occupied.
    • Logic X ( number ) : The X index (0-based).
    • Logic Y ( number ) : The Y index (0-based).
    • Logic Z ( number or string ) : The Z index (0-based).

Condition:Is empty

  • Testing if cell is empty.
    • Logic X ( number ) : The X index (0-based).
    • Logic Y ( number ) : The Y index (0-based).
    • Logic Z ( number or string ) : The Z index (0-based).

Condition:Pick an empty cell

  • Pick an empty cell randomly, return false if all cells are occupied.
    • Logic Z ( number or string ) : The Z index (0-based) of the chess to set. 0 is tile.

Condition:Has any empty cell

  • Return true if there has any empty cell.
    • Logic Z ( number or string ) : The Z index (0-based) of the chess to set. 0 is tile.

Condition:Pick an empty cell on tiles

  • Pick an empty cell randomly on tiles, return false if all cells are occupied.
    • Tile ( object ) : Tile object.
    • Logic Z ( number or string ) : The Z index of the chess to set. 0 is tile.

Condition:Has any empty cell on tiles

  • Return true if there has any empty cell on tiles.
    • Tile ( object ) : Tile object.
    • Logic Z ( number or string ) : The Z index of the chess to set. 0 is tile.

For each LZ

Condition:For each LZ at LXY

  • Repeat the event for each LZ at LXY.
    • Logic X ( number ) : The X index (0-based) of the tile.
    • Logic Y ( number ) : The Y index (0-based) of the tile.

For each cell

Condition:For each cell

  • Repeat the event for each cell in the board.
    • Direction ( Combo ) : Scan direction.
      • Options : ["Top to bottom","Bottom to top","Left to right","Right to left"]

Kick

Condition:On chess kicked

  • Triggered when chess kicked by 'action:Add chess' or 'action:Move chess'.
    • Chess ( object ) : Kicked chess object.

Logic

Condition:On collision

  • Triggered when the object collides with another object.
    • Chess ( object ) : Chess object A.
    • Chess ( object ) : Chess object B.

Condition:Is overlapping

  • Test if the object is overlapping another object.
    • Chess ( object ) : Chess object A.
    • Chess ( object ) : Chess object B.

Neighborhood

Condition:Are wrapped neighbors (UID)

  • Testing if two chess are wrapped neighbors.
    • UID of chess ( number or string ) : UID of chess A.
    • UID of chess ( number or string ) : UID of chess B.

Neighbors

Condition:Are neighbors (UID)

  • Testing if two chess are neighbors.
    • UID of chess ( number or string ) : UID of chess A.
    • UID of chess ( number or string ) : UID of chess B.

Condition:Pick neighbor chess

  • Pick neighbor chess.
    • Origin ( object ) : Origin chess.
    • Direction ( number or string ) : Direction of neighbor. (-1) for all directions
    • Neighbor ( object ) : Neighbor chess object for pickking

Pick chess

Condition:Pick all chess

  • Pick all chess on the board.

Condition:Pick chess

  • Pick chess on board.
    • Chess ( object ) : Chess object.

Pick chess above tiles

Condition:Pick chess above tile

  • Pick chess above tile.
    • Chess ( object ) : Chess object.
    • Tile ( object ) : Tile object.

Condition:Pick chess above tile UID

  • Pick chess above tile UID.
    • Chess ( object ) : Chess object.
    • Tile UID ( number or string ) : Tile UID. Can be tile UID/symbol or a tile UID list in JSON string.

Pick chess by lxyz

Condition:Pick chess at LX,LY

  • Pick chess at Logic X,Y.
    • Chess ( object ) : Chess object.
    • Logic X ( number ) : The X index (0-based) of the tile.
    • Logic Y ( number ) : The Y index (0-based) of the tile.

Condition:Pick chess at LX,LY,LZ

  • Pick chess at Logic X,Y,Z.
    • Chess ( object ) : Chess object.
    • Logic X ( number ) : The X index (0-based) of the tile.
    • Logic Y ( number ) : The Y index (0-based) of the tile.
    • Logic Z ( number or string ) : The Z index (0-based) of the tile.

Condition:Pick chess at LX

  • Pick chess at Logic X.
    • Chess ( object ) : Chess object.
    • Logic X ( number ) : The X index (0-based) of the tile.

Condition:Pick chess at LY

  • Pick chess at Logic Y.
    • Chess ( object ) : Chess object.
    • Logic Y ( number ) : The Y index (0-based) of the tile.

Condition:Pick chess at LZ

  • Pick chess at Logic Z.
    • Chess ( object ) : Chess object.
    • Logic Z ( number or string ) : The Z index (0-based) of the tile.

Condition:Pick chess inside a square

  • Pick chess inside a square.
    • Chess ( object ) : Chess object.
    • Logic X of left ( number ) : The X index (0-based) of the left tile.
    • Logic X of right ( number ) : The X index (0-based) of the right tile.
    • Logic Y of top ( number ) : The Y index (0-based) of the top tile.
    • Logic Y of bottom ( number ) : The Y index (0-based) of the bottom tile.