Advertisement
gmlpaster

question examiner code

Oct 20th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. [make a create event for the following]
  2. attem=0
  3. num1=round(random_range(3,20))
  4. num2=round(random_range(3,23))
  5. num1S=string(num1)
  6. num2S=string(num2)
  7. answer=num1+num2
  8. questiontext="what is "+num1S+"+"+num2S;
  9. [make a drop and drag draw event]
  10. and make a draw text value thing
  11. with the value of question text
  12. [put the following in a step event]
  13. with(whatever you called your input box object){
  14. var a =text
  15. }
  16. attem=a
  17. [put the following in a key pressed enter event]
  18. if(attem==string(answer)){
  19. [add a positive effect on the player for this one]
  20. num1=round(random_range(3,20))
  21. num2=round(random_range(3,23))
  22. num1S=string(num1)
  23. num2S=string(num2)
  24. answer=num1+num2
  25. anstext="what is "+num1S+"+"+num2S;
  26. }
  27. else if(attem!=string(answer)){
  28. [add a negative effect on the player for this one]
  29. num1=round(random_range(3,20))
  30. num2=round(random_range(3,23))
  31. num1S=string(num1)
  32. num2S=string(num2)
  33. answer=num1+num2
  34. anstext="what is "+num1S+"+"+num2S;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement