This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-06-15 02:00:18

slitherax
Scratcher
Registered: 2011-01-09
Posts: 24

Maths Game Question IMPORTANT!

I'm making a Star Wars themed maths game where the player has to answer simple maths questions (2X7, (9X8, etc..). What would the script be for the player to lose some life if the answer is wrong, or the opponent loses life if the player gets it right? Could you please show an example script?

Offline

 

#2 2011-06-15 05:52:37

PlutoIsHades
Scratcher
Registered: 2010-10-18
Posts: 1000+

Re: Maths Game Question IMPORTANT!

You need 3 variables.  One for each contestant and one to store the answer in.  I'm not good at using the blocks in posts, so I'll just write it out. 

ask "What's 2x4?" and wait
set variable "Answer" to {answer}
if "Answer" = 8
       change variable "opponent" by -1
else
       change variable "player" by -1


Minecraft, Redwall, and Cyberchase fan, and PROUD.

Offline

 

#3 2011-06-16 01:58:37

slitherax
Scratcher
Registered: 2011-01-09
Posts: 24

Re: Maths Game Question IMPORTANT!

Thanks, this was just what I needed!  smile

Offline

 

Board footer