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

rex_miniboard_rotate

Plugin, ACE table, Discussion thread
Dependence: rex_miniboard


Introduction
Spin chess on mini board logically and physically.

Usage
ss

Sample capx
Prepare
Add this behavior under mini board object. It could support mini board with  square or
hexagon layout.
Rotating request
Call "Action:Rotate" to rotate the chess in the mini board. Or call "Action:Face" to make the mini board face to specific direction.
  • When this mini board is not at main board. It could be rotated successfully.
  • When this mini board is at main board, it could be rotated if the "put-able" checking of the logical rotated result is true. See the document of rex_miniboard to get more detail about "put-able" checking.
RotateTo
The logical position of chess will be rotated around logical ( 0, 0 ) of mini board
if rotating successfully. Reset physical position if the "
RotateTo" property sets to "Yes". i.e. set "
RotateTo" to "No" will only change the logical position.
Triggers of request result
"
Condition:On rotating accepted" will be triggered if this mini board could be rotated after called
"Action:Rotate
" or
"Action:Face", otherwise "Condition:On rotating rejected" will be triggered.
"Action:Rotate" -> "Condition:On rotating accepted" , or
"Action:Rotate" ->
"Condition:On rotating rejected"
Face direction
The initial face direction could be set at "
Direction" in properties table. This value will be changed after rotating. Get this value by "Expression:Direction".
Rotating testing
These conditions
  • Condition:Can rotate
  • Condition:Can face
  • Condition:Can flip
  • Condition:Can mirror
are used to test if this mini board could rotate/face/flip/mirror to target logical position. These will not change logical neither physical position.

Flip and Mirror
"
Action:Mirror" could mirror this mini board by toggling the sign of logic X for each chess.
"Action:Flip" could flip this mini board by toggling the sign of logic Y for each chess.
They are similar to rotation actions described at previous section.

More sample capx
Rotating hexagon mini board

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