Questions inside the loop
Section 6: Conditions and sensingLesson 6.2 · ⏱ 7 min
We can ask about the keys inside forever instead of using event blocks. That makes the movement smoother, and you can press two keys together.

🖥️ What happens on the stage?
As long as you hold the right arrow, Robo moves smoothly to the right, and the same with the left arrow.
📌 Another example: the spinner
As long as space is held down, Robo turns 10 degrees on every round of forever. Let go and he stops.


✍️ Practise
Add the up and down arrows, then make the key a grow Robo as long as it is held.
✍️ Practise here in the lesson✖ Close the labor open the lab in a new page ↗
🎯 Challenge yourself
Easy
As long as space is held, Robo switches his costume (as if he is dancing).
👀 Show the solution🙈 Hide the solution


Medium
The right arrow moves Robo right, and the up arrow moves him up. Hold both arrows together: which way does he go?
👀 Show the solution🙈 Hide the solution


Hard
Turbo speed: the right arrow moves Robo 3, but if space is held too he moves 15 and says “Turbo! 🚀”. (if inside if)
👀 Show the solution🙈 Hide the solution



