Behavior : Chess

Author:Rex.Rainbow

Download

Properties

Actions

Logic: Add

Action:Add chess

  • {my} add chess on the board.
    • Board ( object ) : Board object.
    • Logic X ( number ) : The X index (0-based) of the chess to set.
    • Logic Y ( number ) : The Y index (0-based) of the chess to set.
    • Logic Z ( number or string ) : The Z index (0-based) of the chess to set. 0 is tile.

Logic: Move

Action:Move chess

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

Action:Move chess by UID

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

Action:Move chess to xyz

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

Logic: Remove

Action:Remove chess

  • {my} remove chess from the board.

Logic: Swap

Action:Swap chess by UID

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

Expressions

Chess

Expression:LX

  • Get X index of selected chess.

Expression:LY

  • Get Y index of selected chess.

Expression:LZ

  • Get Z index of selected chess.

Expression:BoardUID

  • Get board UID, return -1 if not in a board.

Expression:LZ2UID

  • Get UID by Z.
    • Z ( number or string ) : The logic Z.

Expression:UID2LA

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

Expression:ZCnt

  • Get z count.

Expression:DIR2UID

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

Physical

Expression:PX

  • Get physical X co-ordinate.

Expression:PY

  • Get physical Y co-ordinate.

Conditions

Board

Condition:On the board

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

Chess

Condition:Is a tile

  • Return true if z-index of this chess is 0.

Condition:Are neighbors (UID)

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

Collisions

Condition:On collision

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

Condition:Is overlapping

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

Empty

Condition:No chess above

  • Return true if there has no chess above this tile.

Condition:No chess at LZ

  • Return true if there has no chess above this tile at logical Z.
    • Logic Z ( number or string ) : The Z index (0-based) of the chess to set. 0 is tile.

Logical position

Condition:Compare LX

  • Compare the logical X.
    • Comparison ( cmp ) : Choose the way to compare the logical X.
    • LX ( number ) : Logical X.

Condition:Compare LY

  • Compare the logical Y.
    • Comparison ( cmp ) : Choose the way to compare the logical Y.
    • LY ( number ) : Logical Y.

Condition:Compare LZ

  • Compare the logical Z.
    • Comparison ( cmp ) : Choose the way to compare the logical Z.
    • LZ ( number ) : Logical Z.