How do I create random ecuations?

Get help using Construct 2

Post » 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

Post » 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.

Please provide a capx or some more info if your problem is more complex.
B
39
S
9
G
4
Posts: 163
Reputation: 6,516

Post » 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
245
S
39
G
15
Posts: 1,946
Reputation: 40,276

Post » Thu Jan 29, 2015 12:34 pm

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



Return to How do I....?

Who is online

Users browsing this forum: Syazanie Amirin and 9 guests