Rex's plugins for Construct2
  • Home
  • Map
  • Tutorial/Templates
  • News
  • About

rex_miniboard_move

Plugin, ACE table, Discussion thread
Dependence: rex_miniboard


Introduction
Move mini board logically and physically on main board.

Usage
ss

Sample capx
Prepare
Add this behavior under mini board object. It could support mini board with  square or
hexagon layout.
Moving request
Call one of these actions
  • Action:Move to neighbor
  • Action:Move to LXY
  • Action:Move to offset
  • Action:Move to chess
  • Action:Move to chess by UID
to move the chess in the mini board to target logical position.
  • When this mini board is NOT at main board. No thing happens.
  • When this mini board is at main board, it could be moved if the "put-able" checking of logical target position is true. See the document of rex_miniboard to get more detail about "put-able" checking.
MoveTo
Set "
MoveTo" property to "Yes" will move this miniboard with moveTo behavior, if moving successfully. "Condition:On hit target position" will be triggered when moved done.
Set "MoveTo" property to "No" will only move the logical position. It is used to customize moving behavior discussed later.
Triggers of request result
"
Condition:On moving accepted" will be triggered if this mini board could be moved after called one of these moving request action like "
Action:Move to neighbor", otherwise "Condition:On moving rejected" will be triggered.
"Action:Move to neighbor" -> "Condition:On moving accepted" , or
"
Action:Move to neighbor" -> "Condition:On moving rejected"
Customize moving behavior
Follow these steps could customize moving behavior, like move to target position immediately.
  1. Set "MoveTo" property to "No" to disable default moveTo behavior
  2. Add moving action under "Condition:On moving accepted". Here are some referenced parameters -
logical position of target : ( Expression:DestinationLX, Expression:DestinationLY )
logical moving direction : Expression:Direction
physical position of target : ( Expression:TargetX, Expression:TargetY )
Moving testing
These conditions
  • Condition:Can move to neighbor
  • Condition:Can move to
are used to test if this mini board could move to target logical position. These will not change logical neither physical position.

More sample capx
Tetris

Create a free web site with Weebly
  • Home
  • Map
  • Tutorial/Templates
  • News
  • About