How do I create a random sequence of button to press?

Get help using Construct 2

Post » Mon Jul 20, 2015 1:24 pm

I'm making a game for children and I want to create a random sequence of button to press.
I created 7 sprites, and I want to pick 2 of this randomly (and the two chosen will be connected to a specific sound that will start after the picking).
After that, the gamer will press them in order, if he is right the game continue, if he fail the game will stop.
After all that, I want to create various difficulty levels where step by step the sequence will reach 7 items.

Can you help me with this?
I didn't find any tutorial, are there any examples?
Thanks in advance!
B
3
Posts: 9
Reputation: 197

Post » Mon Jul 20, 2015 1:29 pm

I think you can do that with array
Image Image
B
25
S
14
G
139
Posts: 876
Reputation: 72,510

Post » Mon Jul 20, 2015 2:55 pm

I'm interested on this topic too.
So if anyone can help us, I would be very thankful
B
3
Posts: 1
Reputation: 177

Post » Mon Jul 20, 2015 3:29 pm

Yep, that's a classic case of array usage. Fill up an array with the UID of your sprites, then retrieve 2 of them randomly, removing them from the array while fetching.
B
75
S
31
G
27
Posts: 1,000
Reputation: 20,735

Post » Mon Jul 20, 2015 3:33 pm

B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072

Post » Thu Aug 06, 2015 11:17 am

Thank you koebaach! It's exactly what I need!
B
3
Posts: 9
Reputation: 197


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, Christmas, dop2000, irina and 26 guests