Behavior : (Miniboard) Grid move

Author:Rex.Rainbow

Download

Properties

Activated

  • Enable if you wish this to begin at the start of the layout.
    • Options : ["No","Yes"]

Max speed

  • Maximum speed, in pixel per second.

Acceleration

  • Acceleration, in pixel per second per second.

Deceleration

  • Deceleration, in pixel per second per second.

MoveTo

  • Set Yes to move physically by built-in moveTo behavior. Set No will only change the logical position.
    • Options : ["No","Yes"]

Actions

Activated

Action:Set activated

  • Enable the object's Square-grid Move behavior.
    • Activated ( Combo ) : Enable the behavior.
      • Options : ["No","Yes"]

Request

Action:Move to offset

  • Move to relatived offset target.
    • X offset ( number ) : Relatived X offset.
    • Y offset ( number ) : Relatived Y offset.
    • Putable checking ( Combo ) : Mode of putable checking.
      • Options : ["None","Empty","Putable"]

Action:Move to LXY

  • Move to logical position.
    • Logic X ( number ) : The X index (0-based).
    • Logic Y ( number ) : The Y index (0-based).
    • Putable test ( Combo ) : Mode of putable test.
      • Options : ["None","Empty","Putable"]

Action:Move to neighbor

  • Move to neighbor.
    • Direction ( number ) : The direction of neighbor.
    • Putable test ( Combo ) : Mode of putable test.
      • Options : ["None","Empty","Putable"]

Action:Move to chess

  • Move to target chess/tile.
    • Target ( object ) : Target object.
    • Putable test ( Combo ) : Mode of putable test.
      • Options : ["None","Empty","Putable"]

Action:Move to chess by UID

  • Move to target chess/tile.
    • UID ( number ) : Target chess UID
    • Putable test ( Combo ) : Mode of putable test.
      • Options : ["None","Empty","Putable"]

Request: Hexagon grid (Left-Right)

Action:Move to neighbor

  • Move to neighbor.
    • Direction ( Combo ) : Moving direction.
      • Options : ["Right","Down-right","Down-left","Left","Up-left","Up-right"]
    • Putable test ( Combo ) : Mode of putable test.
      • Options : ["None","Empty","Putable"]

Request: Hexagon grid (Up-Down)

Action:Move to neighbor

  • Move to neighbor.
    • Direction ( Combo ) : Moving direction.
      • Options : ["Down-right","Down","Down-left","Up-left","Up","Up-right"]
    • Putable test ( Combo ) : Mode of putable test.
      • Options : ["None","Empty","Putable"]

Request: Square grid

Action:Move to neighbor

  • Move to neighbor.
    • Direction ( Combo ) : Moving direction.
      • Options : ["Right","Down","Left","Up","Right-down","Left-down","Left-up","Right-up"]
    • Putable test ( Combo ) : Mode of putable test.
      • Options : ["None","Empty","Putable"]

Speed

Action:Set maximum speed

  • Set the object's maximum speed.
    • Max speed ( number ) : Maximum speed, in pixel per second.

Action:Set acceleration

  • Set the object's acceleration.
    • Acceleration ( number ) : The acceleration setting, in pixel per second per second.

Action:Set deceleration

  • Set the object's deceleration.
    • Deceleration ( number ) : The deceleration setting, in pixels per second per second.

Action:Set current speed

  • Set the object's Current speed.
    • Current speed ( number ) : Current speed, in pixel per second.

Stop

Action:Stop

  • Stop moving.

Expressions

Current

Expression:Activated

  • The current activated state of behavior.

Expression:Speed

  • The current object speed, in pixel per second.

Request

Expression:Direction

  • Get last moving direction of moving request. Return (-1) if not moving to neighbor.

Expression:DestinationLX

  • Get logic X of destination X when moving request.

Expression:DestinationLY

  • Get logic Y of destination when moving request.

Expression:SourceLX

  • Get logic X of source when moving request.

Expression:SourceLY

  • Get logic Y of source when moving request.

Setting

Expression:MaxSpeed

  • The maximum speed setting, in pixel per second.

Expression:Acc

  • The acceleration setting, in pixel per second per second.

Expression:Dec

  • The deceleration setting, in pixel per second per second.

Target

Expression:TargetX

  • The X co-ordinate of target position to move toward.

Expression:TargetY

  • The Y co-ordinate of target position to move toward.

Conditions

Hit target

Condition:On hit target position

  • Triggered when hit target position.

Move

Condition:Is moving

  • Test if object is moving.

Request

Condition:On moving accepted

  • Triggered when moving request accepted.

Condition:On moving rejected

  • Triggered when moving request rejected.

Condition:Moving accepted

  • Return true if moving request accepted.

Condition:Can move to neighbor

  • Test if object can move to neighbor.
    • Direction ( number ) : The direction of neighbor.
    • Putable test ( Combo ) : Mode of putable test.
      • Options : ["None","Empty","Putable"]

Test

Condition:Can move to

  • Test if object can move to relatived offset target.
    • X offset ( number ) : Relatived X offset.
    • Y offset ( number ) : Relatived Y offset.
    • Putable test ( Combo ) : Mode of putable test.
      • Options : ["None","Empty","Putable"]

Test: Hexagon grid (Left-Right)

Condition:Can move to neighbor

  • Test if object can move to neighbor.
    • Direction ( Combo ) : Moving direction.
      • Options : ["Right","Down-right","Down-left","Left","Up-left","Up-right"]
    • Putable test ( Combo ) : Mode of putable test.
      • Options : ["None","Empty","Putable"]

Test: Hexagon grid (Up-Down)

Condition:Can move to neighbor

  • Test if object can move to neighbor.
    • Direction ( Combo ) : Moving direction.
      • Options : ["Down-right","Down","Down-left","Up-left","Up","Up-right"]
    • Putable test ( Combo ) : Mode of putable test.
      • Options : ["None","Empty","Putable"]

Test: Square grid

Condition:Can move to neighbor

  • Test if object can move to neighbor.
    • Direction ( Combo ) : Moving direction.
      • Options : ["Right","Down","Left","Up","Right-down","Left-down","Left-up","Right-up"]
    • Putable test ( Combo ) : Mode of putable test.
      • Options : ["None","Empty","Putable"]