Array for Card Deck

Get help using Construct 2

Post » Thu May 17, 2012 6:05 pm

How do I make the amount of cards in the Array(Deck) go down every time a player clicks the deck?

I have a bug. Everytime a Player clicks the Deck. The same card is always drawn. I have frames for all the cards in the Sprite, but it doesnt change when a card is drawn.

Want me to post the .capx?
B
5
Posts: 38
Reputation: 501

Post » Thu May 17, 2012 6:36 pm

A capx would be nice, could you also be a bit more specific?
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Fri May 18, 2012 6:33 am

http://timbanon.com/games/Dreamers.capx
B
5
Posts: 38
Reputation: 501

Post » Fri May 18, 2012 9:10 pm

it doesnt look like youve set the initial size of the array so adding to it or tryin to access it does nothing its always gonna be 0

For your first question after you get it to draw the next card then youd remove that card from the array
B
13
S
5
G
2
Posts: 306
Reputation: 3,262

Post » Fri May 18, 2012 10:09 pm

Ohh. Thanks Aridale!
B
5
Posts: 38
Reputation: 501

Post » Sat May 19, 2012 3:20 am

One more question doe.. When i create an object that goes to your hand how do i make it show a different frame. Im understanding the sprite frame/card image is linked to the array somehow. So guessing, im thinking maybe i create the object and set the frame to the number in the array.

How do i set the frame drawn to the array number?
How do i set the size of the array?
How do i remove the number drawn from the array?
B
5
Posts: 38
Reputation: 501


Return to How do I....?

Who is online

Users browsing this forum: Kagubro and 22 guests