Sensing Category
1. touching ( )?
Executes the subsequent script when the sprite touches the mouse pointer, edge of the stage, or another specified sprite.
Example:
After you press the space key, the sprite moves forward 10 steps and moves to the position (0,0) when it touches the edge of the stage.
2. touching color ( )?
Executes the subsequent script when the sprite touches the specified color.
Example:
After you press the space key, the sprite moves forward 10 steps and moves to the position (0,0) when it touches the color pink.
3. color ( ) is touching ( )?
Executes the subsequent script when the specified color touches another one.
Example:
After you press the space key, the sprite moves forward 10 steps and moves to the position (0,0) when the color black touches pink.
4. distance to ( )
Distance from the sprite to the mouse pointer or another sprite.
Example:
When you press the space key, the sprite reports its distance to the mouse pointer.
5. ask () and wait
Asks the specified question and displays an input box for you to answer. The result is saved to the answer block.
Example:
After you press the space key, the sprite asks "What's your name?" and waits for you to enter your answer.
6. answer
Saves the answer entered for the ask () and wait block. It saves the last value entered, and if no value entered, it remains blank.
Example:
After you press the space key, the sprite asks "What's your name?" and waits for you to answer. After you answer the question, it says "Hello" to you.
7. key ( ) pressed?
Executes the subsequent script when you press the specified key.
Example:
When you click the green flag, the sprite says "Hello," and when you press the space key, the sprite says "Nice to meet you!"
8. mouse down?
Executes the subsequent script when you press the mouse.
Example:
After you click the green flag, the sprite says "Yes" when the mouse key is pressed. Otherwise, the sprite says "No".
9. mouse x
x coordinate of the mouse pointer.
Example:
When you press the space key, the sprite reports the x coordinate of the mouse pointer.
10. mouse y
y coordinate of the mouse pointer.
Example:
When you press the space key, the sprite reports the y coordinate of the mouse pointer.
11.set drag mode ( )
Sets the drag mode to draggable or not draggable.
Example:
When you click the green flag, the drag mode is set to draggable.
12. loudness
Current loudness.
Example:
When you press the space key, the sprite reports the current loudness.
13. timer
Value of the timer.
Example:
When you press the space key, the sprite reports the value of the timer.
14. reset timer
Resets the timer.
Example:
When you press the space key, the value of the timer is reset to zero.
15. ( ) of ( )
Specified value of the stage or a sprite. The options include x position, y position, direction, costume #, costume name, size, volume, backdrop #, and backdrop name.
Example:
When you press the space key, the sprite reports the x coordinate of Jellyfish1.
16. current ( )
Current year, month, date, week, hour, minute, or second.
Example:
When you press the space key, the sprite reports the current year.
17. days since 2000
Number of days since 2000.
Example:
When you press the space key, the sprite reports the number of days passed since 2000.