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

#1 2013-02-24 20:41:09

aaminor
New Scratcher
Registered: 2013-02-12
Posts: 14

What is wrong with this block?

I'm trying to make a Hangman game. The purpose of this block is to tell the script to continue asking the player to guess letters until the player has guessed all of the correct letters.

It is a "Repeat until" block. In input space, I have a block that says "length of (CorrectGuesses) = length of (Word)"

CorrectGuesses is a list of all the letters in the word that the player has guesses.
Word is the randomly selected word that the player is trying to guess.

How can I rewrite this to do what I want?

Offline

 

#2 2013-02-24 21:45:06

piguillaud
Scratcher
Registered: 2010-06-19
Posts: 100+

Re: What is wrong with this block?

And what happens when you run this script?

Offline

 

#3 2013-02-24 22:01:12

aaminor
New Scratcher
Registered: 2013-02-12
Posts: 14

Re: What is wrong with this block?

When I run the entire script, it will display the message that I won after one correct letter is guessed. For example, I could guess the 'c' in cat, and, even if it's my first guess, it will say "you've won!"

Offline

 

Board footer