Hi @yasmeen!
Entering a number or text into an input field during the play mode is currently not possible. It’s a very interesting idea and something we’ll be looking into!
An alternative approach to your multiplication game can be done as a quiz. Below you can find an example plus code.
Show multiplication game example
Click here to play the example
Code
How it works
For this game we create three functions. One to check the answer, and the other two to display a message if the answer is right or wrong. The checkAnswer
function has two parameters. The first, panelValue
, is the number that is displayed on the text item. The second, correctValue
, is the number you want to test the panelValue
against to see if it’s correct.
We place three onActivate
- blocks for each of the answer-texts. When one of the text items is clicked, we call the checkAnswer
function with the number of the text item and compare it to the solution.
Inside the checkAnswer
function we use an if-statement to see if the panel value is the same as the correct value of the question, then display a message accordingly.
Code in action
Hope this helped!