How do I make a card game with instance variables

Get help using Construct 2

Post » Sun Jun 07, 2015 2:54 pm

So i wanna make a card game but i can't quite figure out how to make it so u can draw your cards from a deck.
I first tried it with arrays but on the forum is a post that it's better with instance variables, but don't really know how to start on it.
Any suggestions?
B
3
Posts: 6
Reputation: 189

Post » Sun Jun 07, 2015 5:28 pm

Before instance variables, I suggest first have the deck ready.

Make a Sprite called "deck", and have four Animations in there, of Spades, Clubs, Hearts, Diamonds. Each of them should have 13 frames in total and have all the sprites (images) ready therin.

This will organize your deck in a way that later you can program it according to your potential game conveniently.

Picking random card is easy - You just need to pick random animation and random frame within a given range.
B
10
S
2
Posts: 109
Reputation: 982


Post » Sun Jun 14, 2015 9:32 pm

I got another question, but i would like to show my capx, but how do i upload it to the forum?
I don't think putting the cards in the array is working for me.
B
3
Posts: 6
Reputation: 189


Return to How do I....?

Who is online

Users browsing this forum: beohs, tunepunk and 9 guests