[↑]
SmileBASIC4 Replica Reference
TCSUBM
Get recognition information of Toy-Con Submarine

TCSUBM ControllerID, OUT RecognitionFlag[,Accelerator,LeftWheelAngle,RightWheelAngle]

・An error occurs if 9 or 10 is not specified for Toy-Con type in XCTRLSTYLE.
・Return values after the accelerator can be omitted.

Argument

ControllerID

ID of the controller that acquires information: 1 to 2

Return Value

RecognitionFlag

Return the bit value of whether or not Toy-Con Submarine is recognized and the state of the operation button.

0 Unrecognized
bit0 Recognizing
bit1 Vehicle Toy-Con Key Button
bit2 Toy-Con Submarine Button

Accelerator

Toy-Con Pedal depression: 0 to 1.0

LeftWheelAngle

Left wheel rotation angle: -0.5 to 0.5

・-0.5 indicates -180 degrees, 0.5 indicates 180 degrees.
・The value is reversed when the wheel is rotated 180 degrees or more.

RightWheelAngle

Right wheel rotation angle: -0.5 to 0.5

・-0.5 indicates -180 degrees, 0.5 indicates 180 degrees.
・The value is reversed when the wheel is rotated 180 degrees or more.

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
|