How to randomise 10 numbers except one of them of them

Get help using Construct 2

Post » Tue Jul 26, 2016 7:29 pm

I intend to randomise 10 numbers (or ten letters/words) to associate the result to a variable that will define the correct number (letter/words). After this, I need to random the 10 numbers (letters/words) again except the number (letter/word) associated to the variable for the user to choose among this number (letter/word) and the correct one.
B
73
S
13
G
3
Posts: 994
Reputation: 7,504

Post » Tue Jul 26, 2016 10:38 pm

Not sure I follow what you are asking for but maybe start with this:

var TargetNumber = -1

function Randomize:
For Each Random Number
--If RandomNumber != TargetNumber
---Random Number = floor(Random(1,10))

Of course make sure you are familiar with Random(), Choose(), Floor(), Ceil()
ImageImageImage
B
39
S
22
G
11
Posts: 486
Reputation: 9,913

Post » Tue Jul 26, 2016 11:00 pm

Thank you. I will try to implement it.
B
73
S
13
G
3
Posts: 994
Reputation: 7,504


Return to How do I....?

Who is online

Users browsing this forum: BadMario, istero, mr32D, mtnboy22, user5487 and 1 guest