random generation of result in 3 options

  • 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

  • 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....

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • sorry i didn't get u can u please provide me a sample capx file

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)