Go To ()
go to [ v]:: extension
Category Face Sensing
Type Stack
Introduced in 3.0

The go to () block is a Face Sensing block and a stack block. The block automatically moves the sprite to the specified element of a detected face, if there is one. The options are:

  • nose
  • left eye
  • right eye
  • between eyes
  • left ear
  • right ear
  • top of head

If the selected body part is not detected in the frame, the sprite will not move.

Example Uses

  • A dress-up game with clothing:
forever
say [Look! I'm a hat!]
go to [top of head v]:: extension
set size to face size:: extension
end
  • Detecting where elements are on the screen, and using them:
go to [left eye v]:: extension
set [left-eye-x v] to (x position)
go to [right eye v]:: extension
set [right-eye-x v] to (x position)
go to x: (0) y: (0)
if < ((right-eye-x) - (100)) > (left-eye-x) > then
    say [Wow, you are quite close to the camera!]
end
Cookies help us deliver our services. By using our services, you agree to our use of cookies.