Chess Neighbours

Get help using Construct 2

Post » Fri Feb 15, 2013 12:23 pm

Hi All,

Hoping someone can help me with a little issue I'm having.

I'm using Chess and Grid objects to move my playing pieces around a board(Piece A).
I can work out if the moving piece comes next to another piece(Piece B).

What I need to know is how to get the details of the piece B I'm moving past.

So I have instance variables attached to pieces that tell me the type they are, and If I move move past one I want to know what type it is, but not sure how to reference it.

I've tried things like this but it doesn't work.

Chess(1,1).PieceType
Chess(UID).PieceType

If someone could help me that would be amazing.

Cheers
Chris
B
3
Posts: 7
Reputation: 439

Post » Fri Feb 15, 2013 12:27 pm

Try out arrays , I don't have enough in arrays experience to help you here , but I'll be way easier for you to solve this problem using them
Hope it helped
Cheers
B
35
S
16
G
16
Posts: 2,222
Reputation: 16,589


Return to How do I....?

Who is online

Users browsing this forum: WhosWho and 21 guests