How do I pre-define my chess piece movements?

Get help using Construct 2

Post » Sun Jul 06, 2014 9:56 pm

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
You do not have the required permissions to view the files attached to this post.
B
6
S
1
Posts: 41
Reputation: 482

Post » Mon Jul 07, 2014 1:27 am

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.
B
92
S
32
G
106
Posts: 5,272
Reputation: 69,455

Post » Mon Jul 07, 2014 7:10 am

That's brilliant thank you :)
I'll take a look through that later.
I appreciate you posting that
B
6
S
1
Posts: 41
Reputation: 482

Post » Mon Jul 07, 2014 6:04 pm

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.
B
6
S
1
Posts: 41
Reputation: 482


Return to How do I....?

Who is online

Users browsing this forum: Bootfit, mihirolover, Prominent, tarek2 and 11 guests