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

#1 2009-07-21 13:26:51

turtlewarrior
Scratcher
Registered: 2009-06-19
Posts: 500+

The Question (Possibly of doom)

How do you make it so that when you are using an ask block you can make it so that if the player does not choose type the response correctly he loses a life? I'm making a game, and you have to type in the four digit number you see. If you type in the correct 4 digits you move on to the next round. But when the player types in the wrong answer I want to make it so that it says "Wrong!" and you lose a life. How?

Offline

 

#2 2009-07-21 16:37:39

greenflash
Scratcher
Registered: 2009-05-27
Posts: 1000+

Re: The Question (Possibly of doom)

Here you go:
<if><<  <not> <( answer <=> the right answer here )> >>
<change{ lives }by( -1
<say[ -1 life ]
<end>


http://i48.tinypic.com/2wrkirk.pnghttp://i46.tinypic.com/6r5zk7.pnghttp://i45.tinypic.com/2vtxr1t.png

Offline

 

#3 2009-07-22 12:10:04

turtlewarrior
Scratcher
Registered: 2009-06-19
Posts: 500+

Re: The Question (Possibly of doom)

Why thank youz

Offline

 

#4 2009-07-22 12:24:54

turtlewarrior
Scratcher
Registered: 2009-06-19
Posts: 500+

Re: The Question (Possibly of doom)

But "if not " does not have a text box, so how could you write text there? You can't type the answer in.

Last edited by turtlewarrior (2009-07-22 12:25:18)

Offline

 

#5 2009-07-22 12:27:00

RoyandAnna
Scratcher
Registered: 2009-07-21
Posts: 20

Re: The Question (Possibly of doom)

I assume that you create a variable for the answer and a variable for the correct answer.

Offline

 

#6 2009-07-22 12:42:32

turtlewarrior
Scratcher
Registered: 2009-06-19
Posts: 500+

Re: The Question (Possibly of doom)

Thanks, that helps.

Offline

 

#7 2009-07-22 12:44:03

RoyandAnna
Scratcher
Registered: 2009-07-21
Posts: 20

Re: The Question (Possibly of doom)

No problem.  I am trying to learn this stuff myself. 

Currently, I have created a grand total of 1 project in about 4 hours.  But luckily the learning curve is pretty gentle.

Offline

 

#8 2009-07-22 12:46:09

RoyandAnna
Scratcher
Registered: 2009-07-21
Posts: 20

Re: The Question (Possibly of doom)

BTW, I love the games that you have already done.  Keep up the good work.

Offline

 

Board footer