Behavior : 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.

Wander range x

  • Random moving in the boundary.

Wander range y

  • Random moving in the boundary.

Force move

  • Enable if you wish to ignore solid checking. It will change z index when logical overlapping.
    • Options : ["No","Yes"]

MoveTo

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

Continued mode

  • Moving as in continued-time.
    • Options : ["No","Yes"]

Actions

AI: Approach/Depart

Action:Approach/Depart

  • Approach to chess or depart from chess.
    • Chess ( object ) : Chess object.
    • Mode ( Combo ) : Approach or Depart.
      • Options : ["Approach to","Depart from"]

Action:Approach/Depart chess by UID

  • Approach to chess or depart from chess.
    • Chess UID ( number or string ) : The UID of chess
    • Mode ( Combo ) : Approach or Depart.
      • Options : ["Approach to","Depart from"]

AI: Wander

Action:Wander

  • Random moving in the boundary.

Action:Set range x

  • Set the object's wander range x.
    • Range x ( number ) : Wander range x, in logic unit

Action:Set range y

  • Set the object's wander range y.
    • Range y ( number ) : Wander range y, in logic unit

Action:Set random generator

  • Set random generator object.
    • Random generator ( object ) : Random generator object

Action:Reset center position

  • Reset wander center position to current logic position.

Collisions

Action:Set instance group

  • Set instance group object.
    • Group ( object ) : Instance group object

Configuration

Action:Set activated

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

Action:Enable force moving

  • Enable if you wish to ignore solid checking. It will change z index when logical overlapping.
    • Force move ( Combo ) : Enable the force moving feature.
      • 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.

Action:Move to LXY

  • Move to logical position.
    • Logic X ( number ) : The X index (0-based).
    • Logic Y ( number ) : The Y index (0-based).

Action:Move to neighbor

  • Move to neighbor.
    • Direction ( number ) : The direction of neighbor.

Action:Move to chess

  • Move to target chess/tile.
    • Target ( object ) : Target object.

Action:Move to chess by UID

  • Move to target chess/tile.
    • UID ( number or string ) : Target chess UID

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"]

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"]

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"]

Solid

Action:Set solid

  • Set solid. Used under 'condition: On get solid'.
    • Solid ( Combo ) : Solid property.
      • Options : ["No","Yes"]

Action:Set solid by number

  • Set solid. Used under 'condition: On get solid'.
    • Solid ( number ) : Solid property. 0=Disable, 1=Enable.

Action:Set move-able

  • Set move-able. Used under 'condition: On get solid'.
    • Move-able ( Combo ) : Move-able.
      • Options : ["No","Yes"]

Action:Set move-able by number

  • Set move-able. Used under 'condition: On get solid'.
    • Move-able ( number ) : Move-able. 0=Disable, 1=Enable.

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.

Swap

Action:Swap

  • Swap with target chess.
    • UID ( number or string ) : Target UID.

Expressions

Current

Expression:Activated

  • The current activated state of behavior.

Expression:Speed

  • The current object speed, in pixel per second.

Request

Expression:BlockerUID

  • Get UID of blocker when moving request rejected.

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:DestinationLZ

  • Get logic Z 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.

Expression:SourceLZ

  • Get logic Z 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

Collisions

Condition:On colliding begin - group

  • Triggered when this chess collides begin with another chess.
    • Chess ( object ) : Chess object.
    • Group ( string ) : Put result in this group

Condition:On colliding begin

  • Triggered when this chess collides begin with another chess.
    • Chess ( object ) : Chess object.

Move

Condition:Is moving

  • Test if object is moving.

Reach

Condition:On reach target position

  • Triggered when reach target position.

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.

Solid

Condition:On get solid

  • Triggered by plugin to get solid property from event sheet.

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.

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"]

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"]

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"]