0 Favourites

How do I pre-define my chess piece movements?

  • Currently i'm using the rexrainbow plugin SLGMovement to move my chess pieces, but if somebody has a better working solution for this, I would be happy to try something else.

    I am putting together a chess game. When I choose a piece to move, it currently can move in any direction.

    I need to restrict its movement based on type of piece. A pawn for instance can only move up and down on the Y-axis.

    Perhaps I need to create new (invisible) tiles either side of the selected tile and set them as blocked tiles so they can't be used when finding the movement path?

    Perhaps I need to use the "Chess Pick Neighbour" function in the 2 and 4 directions - but I don't know how to filter the movement areas to exclude specific tiles?

    I have attached my capx file. As you can see I have made a lot of progress since I began.

    You can now take turns at moving pieces, and they animate in the direction they are travelling.

    I only have two roadblocks at the moment that I need help with, which is the above filtering issue so I can define the paths for each type of piece, AND to enable diagonal movement. Currently they only move 4-way directions, but I need them to move 8-ways on the grid.

    Any help much appreciated.

    Thanks

  • I haven't used that plugins so I can't be of help there. I do have a capx where I did chess movement without any third party plugins. It perfectly generates all legal moves for any piece selected, minus moves like en passe and castling. So in short it's a different way to do it but likely not an easy or better.

    https://dl.dropboxusercontent.com/u/542 ... chess.capx

    But I'm sure rex has a way for it to work with his plugin.

  • That's brilliant thank you

    I'll take a look through that later.

    I appreciate you posting that

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • I have just opened it up... it's brilliant thank you

    I had to edit the project file. It was apparently saved in v174, but I have v173 so it wouldn't open to start with.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)