Card game - layer & Z-order issues

0 favourites
  • 3 posts
From the Asset Store
Template for trading card game, fully documented in comments and video
  • Greetings, I need some help with the card game I'm trying to make. The player has up to 10 cards in his hand, and they are displayed in such manner that they are slightly overlapping from right to left (think of games such as Hearthstone or Slay the Spire etc). When the player hovers the cursor over a card, it stands out from the rest. Its size is slightly increased, and it is placed on top of the layer so it can be seen clearly. When it's not above the card (else), the size resets back, however I can't figure out how to bring the card back to its original Z-order. Whatever I do, the card just stands out from the rest.

    Any ideas?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey there, if you have the full C3 version, put your cards in a family, then use this family to compare which card is displayed before the one selected, and move the selected card on top of it, this should be doable with a variable that determine each card order in the player hand

  • I made an example that doesn't require families : drive.google.com/file/d/1D4DUWtDqlGsf0l849M1GoiEicVNvN44j/view

    I also added a smooth movement effect when hovering the mouse on top of the cards; This is just for the Z ordering visual tho, I didn't add any auto sorting of some sort, but if you eventually need help with it I can give it a shot as well

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