# How do I create random ecuations?

Get help using Construct 2

### » Wed Jan 28, 2015 7:10 pm

Hello,

I am trying to make something like FreakingMath where the ecuations are created randomly. I have a Number1,Number2,Number3 and Number4 global variables wich are setted to take a random value from 1 to 9. Now I want to create a random ecuation with them(eg. Number2+Number1-Number3). Is there any expresion that choose between operators?(eg. choose(1,2,3) but with operators choose(+,-) )
B
14
S
3
G
1
Posts: 69
Reputation: 950

### » Wed Jan 28, 2015 10:42 pm

One simple way of achieving minus or plus would be to simple set your numbers to a random number from -9 to 9 and then use Number1 + Number2 + Number3.

B
39
S
9
G
4
Posts: 163
Reputation: 6,521

### » Thu Jan 29, 2015 12:25 pm

Work it out with this demo of maths
You do not have the required permissions to view the files attached to this post.
B
262
S
46
G
15
Posts: 2,000
Reputation: 41,919

### » Thu Jan 29, 2015 12:34 pm

@Lordshiva1948 thank you.
B
14
S
3
G
1
Posts: 69
Reputation: 950

### » Thu Jan 29, 2015 12:39 pm

You welcome
B
262
S
46
G
15
Posts: 2,000
Reputation: 41,919