Random Card

Get help using Construct 2

Post » Mon Nov 18, 2013 11:41 am

I want to make a game where you click a button to draw one of 30 cards from a deck and it shows on the screen.

Then a simple back button to the main menu to do it again.

No platform, no scoring, no points.

Is it possible to do in this program?
B
1
Posts: 2
Reputation: 129

Post » Mon Nov 18, 2013 12:01 pm

Yes it is possible.

Create a sprite or an array which hold your 30 cards and then use the random() function to pick a random card.

And then display it.cvp2013-11-18 12:01:42
B
20
S
6
G
4
Posts: 347
Reputation: 4,451

Post » Mon Nov 18, 2013 12:02 pm

Yes, fill an array with your cards (+ their properties if you want), could add shuffling or just let the system pick a card randomly out of the array if sequence of cards in the stack doesn't matter.

http://www.scirra.com/forum/randomized-an-array-for-a-deck-of-cards_topic45833.html
maybe this thread could help you
Visual Novel 'Engine' in 100 Events
if you ever have to choose between buying Construct 2 on scirra.com or on Steam, read this: Review
B
22
S
9
G
1
Posts: 788
Reputation: 3,788

Post » Mon Nov 18, 2013 1:46 pm

as i do it:

make an object with 30 animations. name them like "card1", "card2", ...

then i create an variable which creates a random number to choose a random card. => round(random(1,30))
B
9
S
2
G
1
Posts: 14
Reputation: 1,180

Post » Wed Nov 20, 2013 5:22 am

Thats fantastic! I hope to have something made by next week. Wish me luck! Anyone hang out on skype for random messages back and forth?
B
1
Posts: 2
Reputation: 129


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 45 guests