ID:156674
 
How do I have it so when you can sit at a desk you start answering random math questions that will pop up on the screen?
And the more you answer the harder are the questions. And every time you get a question right you get smarter like brainpoints+=1 and you get more points as the questions get harder. If anyone understand what I mean could someone help me accomplish this???
Here one way to do it.
obj/desk
var/max=10
var/min=1
verb
Math()
set src in usr.loc
var/n1=rand(min,max)//rand(min=1,max=10)
var/n2=rand(min,max)
usr<<"Whats [n1] + [n2] equal."
var/ans=n1+n2//Answers equals n1 to n2
var/ansgiv=input("Whats the answer.",
"Number",
)
ansgiv=text2num(ansgiv)//Convert text strings to numbers.
if(ans==ansgiv)
usr<<"Correct!"
max+=1000//Makes it harder.
else usr<<"Wrong the answer is [ans]."


If you want to use other equations. Just make a var and use pick(n1+n2,n1-n2)