Discuss Scratch

jocab_reedy
Scratcher
4 posts

How do you use multiple answer variables?

On my project I have to allow user input(i have to ask the user a question) and then make something based on the user's input. I know how to use the answer and the ask and wait variable, but I want to use multiple answer variables ( I want to ask one question, and then ask another question that is supposed to do something else). So I tried a bunch of things like making a block from the make a block section, but I couldn't get it to work. Does anyone know how to use multiple answer variables?




Project: https://scratch.mit.edu/projects/102812115/
Camo-Dude
Scratcher
500+ posts

How do you use multiple answer variables?

jocab_reedy wrote:

On my project I have to allow user input(i have to ask the user a question) and then make something based on the user's input. I know how to use the answer and the ask and wait variable, but I want to use multiple answer variables ( I want to ask one question, and then ask another question that is supposed to do something else). So I tried a bunch of things like making a block from the make a block section, but I couldn't get it to work. Does anyone know how to use multiple answer variables?




Project: https://scratch.mit.edu/projects/102812115/
try this i believ this is kinda what your looking for
First put all questions into a list
whenIreceiveAnswerifTurn=P1thenaddanswertoPlayer 1 Answers setTurntoP2broadcastNext QuestionelseifTurn=P2thenaddanswertoPlayer 2 Answers setTurntoP1broadcastNext QuestionwhenIreceiveNext questionaskitemQuestionofQuestionsandwaitchangeQuestionby1
Deerleg
Scratcher
1000+ posts

How do you use multiple answer variables?

Use multiple variables to store each answer. For example, if you asked SomeQuestion, you could store the answer in a variable called Question1 or something. Then you can reuse the answer variable for other variables.
bl111006
Scratcher
2 posts

How do you use multiple answer variables?

n

Last edited by bl111006 (Nov. 16, 2017 20:20:06)

DaEpikDude
Scratcher
1000+ posts

How do you use multiple answer variables?

bl111006 wrote:

n
This topic is from 2016. The OP's question has likely been answered already. Also, if you post on a topic, please make sure your posts stay relevant. Thanks!

Powered by DjangoBB