Revision as of 16:23, 9 June 2021 by TheTrillion (talk | contribs) (Made the blocks more specific.)

Motor () Position
motor ( v) position::boost
Category LEGO BOOST
Type Reporter
Introduced in 3.0

The motor () position block is a reporter block and a LEGO BOOST block. It returns the degree that the selected motor is currently positioned at.

Example Uses

  • Constantly point in the direction of a motor
when green flag clicked
forever
    point in direction (motor (a v) position :: boost)
end
  • Detect when a motor is exactly facing a certain direction
when green flag clicked
forever
    if <(motor (a v) position :: boost) = [90]> then
        say [Spot on!]
    end
end
  • Create a chase game, where tilting the motor is the main mechanic
when green flag clicked
forever
    point in direction (motor (a v) position ::Boost)
    move (10) steps
end
Cookies help us deliver our services. By using our services, you agree to our use of cookies.