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
22
S
13
G
135
Posts: 871
Reputation: 70,320

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
69
S
28
G
24
Posts: 977
Reputation: 18,739

Post » Mon Jul 20, 2015 3:33 pm

Image
B
65
S
23
G
7
Posts: 1,502
Reputation: 10,890

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: plinkie and 21 guests