Create/wiki/Lua-Rotation-Speed-Controller.md
caelwarner 952941e5fc
Added documentation for train station peripherals and train schedules
- Added in depth documentation for working with train stations and train schedules in Lua
- Fixed small formatting issues in Lua-Rotation-Speed-Controller.md and Lua-Sequenced-Gearshift.md
2023-03-13 16:31:16 -07:00

746 B

Method Description
setTargetSpeed(speed) Sets the target rotation speed
getTargetSpeed() Gets the current target rotation speed

setTargetSpeed(speed)

Sets the rotation speed controller's target speed.

Parameters

  • speed: number Target speed. Must be an integer within range of [-256..256]. Values outside of this range will be clamped.

getTargetSpeed()

Gets the rotation speed controller's current target speed.

Returns

  • number Current target rotation speed.