Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Right/wrong answer
- jra15
-
New Scratcher
3 posts
Right/wrong answer
I am having a problem in my game where if someone puts the wrong answer once then it says ‘try again’ however if they then write the correct answer it still says try again. Any help would be much appreciated as this really has me stumped!
- HarryPotterGeek500
-
Scratcher
100+ posts
Right/wrong answer
I am having a problem in my game where if someone puts the wrong answer once then it says ‘try again’ however if they then write the correct answer it still says try again. Any help would be much appreciated as this really has me stumped!Use this:
if <(answer) = [correct answer ]> then
say [correct!]
end
- Crimson19
-
Scratcher
1000+ posts
Right/wrong answer
if <(answer) = [correct ]> then
say [Correct]
else
say [Incorrect]
end
- digthebone
-
Scratcher
500+ posts
Right/wrong answer
do you want it to ask a math question? If so, what operation? And do you want it to say a random math question?
- jra15
-
New Scratcher
3 posts
Right/wrong answer
do you want it to ask a math question? If so, what operation? And do you want it to say a random math question?
no it is a language game so the idea is that they write the colour in Spanish and if it is spelt wrong three times it goes to another screen so they can recap on the possible answers. When I have tried to make this the case it takes any answer as the incorrect one for some reason, even if it is the right answer.
- paintbox55
-
New Scratcher
1 post
Right/wrong answer
do you want it to ask a math question? If so, what operation? And do you want it to say a random math question?
no it is a language game so the idea is that they write the colour in Spanish and if it is spelt wrong three times it goes to another screen so they can recap on the possible answers. When I have tried to make this the case it takes any answer as the incorrect one for some reason, even if it is the right answer.
Use a code like this:
when green flag clicked
ask [20x2] and wait
if <(answer) = [40]> then
say [Well done!] for (2) secs
else
say [Oh no!] for (2) secs
end
Last edited by paintbox55 (Nov. 7, 2017 07:26:06)
- deck26
-
Scratcher
1000+ posts
Right/wrong answer
This is an old topic and was presumably resolved as far as the OP is concerned.do you want it to ask a math question? If so, what operation? And do you want it to say a random math question?
no it is a language game so the idea is that they write the colour in Spanish and if it is spelt wrong three times it goes to another screen so they can recap on the possible answers. When I have tried to make this the case it takes any answer as the incorrect one for some reason, even if it is the right answer.
Use a code like this:when green flag clicked
ask [20x2] and wait
if <(answer) = [40]> then
say [Well done!] for (2) secs
else
say [Oh no!] for (2) secs
end
- YubNubEwok
-
Scratcher
1000+ posts
Right/wrong answer
Please don't necropost, this topic is very old and I'm pretty sure it has been solved.do you want it to ask a math question? If so, what operation? And do you want it to say a random math question?
no it is a language game so the idea is that they write the colour in Spanish and if it is spelt wrong three times it goes to another screen so they can recap on the possible answers. When I have tried to make this the case it takes any answer as the incorrect one for some reason, even if it is the right answer.
Use a code like this:when green flag clicked
ask [20x2] and wait
if <(answer) = [40]> then
say [Well done!] for (2) secs
else
say [Oh no!] for (2) secs
end
Reporting to be closed.
- Discussion Forums
- » Help with Scripts
-
» Right/wrong answer






