[↑]
SmileBASIC4 Replica Reference
TCBIKE
Get the recognition information of Toy-Con Motorbike

TCBIKE ControllerID OUT RecognitionFlag[,HandleTilt,AccelAmount,AccelAngle,WheelieAngle]

・An error occurs if XCTRLSTYLE is used without recognizing the Toy-Con Motorbike.
・Return values after HandleTilt can be omitted.

Argument

ControllerID

ID of the controller that acquires information: 1 to 2

Return Value

RecognitionFlag

Return whether or not the Toy-Con Motorbike is recognized and the state of the operation button as a bit value

0 Unrecognized
bit0 Recognizing
bit1 Brake Lever
bit2 Left Front Button
bit3 Right Front Button

・Recognition method is to put the left and right Joy-Con on the Toy-Con Motorbike and keep them stationary until the recognition flag returns a value other than 0.
・If it is not recognized, the button status is always 0.

HandleTilt

Get the amount of handlebar tilt with a value between -1.0 and 1.0

・Tilt to the left for positive values, tilt to the right for negative values, 0 for horizontal.

AccelAmount

Get the amount of accelerator twist with a value between 0 and 1.0

・Return 0 when not twisted.

AccelAngle

Get accelerator twist angle in radians

・Return 0 when not twisted.

WheelieAngle

Get the angle in radians when the Toy-Con Motorbike is facing up

About this site
Our site is an unofficial manual site of programming software "SmileBASIC" for NintendoSwitch™.
I acquire the content of the site from the official reference site of the SmileBoom Co.Ltd. that is the development and sales cause of the software in real time (a minimum period of 24 hours update) and display it. For automatic update, contents may become improper.
Please confirm the correct content in an official site.

June 3, 2020
by mim
OK
|