B
BJO13
Guest
Hey!
I'm creating a collectible card game and I have the cards in an array in the global object that is created in the first room. You're able to visit the 'shop' and buy a pack and it will give three random cards.
The array is 2D so that I can keep track of the card name alongside the amount of the card that is owned. Now what I'm struggling to do is display the collection of cards.
So I have my array:
Card[0,0]=0
Card[0,1]="Card One"
It's all set up like that.
When I display the collection, I want to display one card at a time. Obviously, I only want to display cards that are owned by the player, so the value on the [0,0], [1,0], [2,0] etc.. has to be greater than 0. But it has to draw the card and then the amount of the card will be shown through text below the card.
How would I go about displaying this?
And the card would change for example if I clicked a button to the right, it would go to the next card with a value greater than 0.
I know this sounds complicated and maybe there is even a better way to do this, but if I could get some help, I'd appreciate it.
I'm creating a collectible card game and I have the cards in an array in the global object that is created in the first room. You're able to visit the 'shop' and buy a pack and it will give three random cards.
The array is 2D so that I can keep track of the card name alongside the amount of the card that is owned. Now what I'm struggling to do is display the collection of cards.
So I have my array:
Card[0,0]=0
Card[0,1]="Card One"
It's all set up like that.
When I display the collection, I want to display one card at a time. Obviously, I only want to display cards that are owned by the player, so the value on the [0,0], [1,0], [2,0] etc.. has to be greater than 0. But it has to draw the card and then the amount of the card will be shown through text below the card.
How would I go about displaying this?
And the card would change for example if I clicked a button to the right, it would go to the next card with a value greater than 0.
I know this sounds complicated and maybe there is even a better way to do this, but if I could get some help, I'd appreciate it.