Chess Neighbours

0 favourites
  • 2 posts
From the Asset Store
Beautiful Black & White Chess Pieces for Chess Game.
  • 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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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

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