random generation of result in 3 options

Just started using Construct 2? Post your questions here

Post » Fri May 18, 2018 11:48 am

hi,
Iam developing a math game in construct2, in which the random mathematical operations will perform which has 3 options .
I got error in displaying the result randomly in 3 options it is displaying only in single option repeatedly.so this is the problem iam facing in my game .can u please suggest a solution for this
B
4
Posts: 10
Reputation: 220

Post » Fri May 18, 2018 4:07 pm

What do you have already?
But for now, i think on: For + random + variable to control whether the result was already shown or not.

On iteration 1 you randomly checks if the result is in this position; If it is, change the control variable;
On iteration 2 if the variable isnt changed already, randomly checks if the result is in this position; If it is, change the control variable;
On 3 you check if the variable is still unchanged; if so, the result is in this position.

Something like this. Of course you can control with other kind of comparisons and instead of a for you can use a while, so you get out of loop as soon as you get the result to be shown....
B
19
S
7
G
4
Posts: 184
Reputation: 4,198

Post » Sat May 19, 2018 5:06 am

sorry i didn't get u can u please provide me a sample capx file
B
4
Posts: 10
Reputation: 220


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 0 guests