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

#1 2011-12-12 21:18:54

WingsGames
Scratcher
Registered: 2011-02-21
Posts: 500+

Question about "answer" block

Is there a way to set answer to 0?


Are you an aspiring home decorator? If so, please answer my question!

Offline

 

#2 2011-12-12 21:20:42

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: Question about "answer" block

You can't change the answer value, but you can create a variable, set it to the answer value, and then set the variable to 0 when you need to.

Offline

 

#3 2011-12-12 21:25:38

kayybee
Scratcher
Registered: 2009-12-07
Posts: 1000+

Re: Question about "answer" block

You can't quite change the "answer" block because it is user input. Use Greenatic's method.

It's sort of like saying "make mouse click at point 2, 30"

Offline

 

#4 2011-12-13 10:27:16

RedRocker227
Scratcher
Registered: 2011-10-26
Posts: 1000+

Re: Question about "answer" block

The answer block isn't really a variable though. It changes, but only depending on what the user enters. You could try this though:

When green flag clicked
Repeat until answer=0
    Ask '[Question]' and wait
End repeat until

This will only execute the next blocks once the answer is 0.  wink


Why

Offline

 

Board footer