[↑]
SmileBASIC4 Replica Reference
TCHOUSE
Get Toy-Con recognition information

TCHOUSE ControllerID OUT RecognitionFlag,InformationArray

・An error occurs if XCTRLSTYLE is used without starting Toy-Con recognition.

Argument

ControllerID

ID of the controller that acquires information: 1 to 2

Return Value

RecognitionFlag

Return whether or not Toy-Con is recognized. Recognizing with 1. Not recognized by 0

InformationArray

Return a 2D numeric array containing information about each slot

The meaning of Y and X when the array element is [Y, X] is as follows

Y=0 Bottom Slot
1 Left Slot
2 Right Slot

・The type of block inserted as follows is stored at X=0.

0 No Block
1 Crank Block
2 Button Block
3 Key Block
4 Cable 1
5 Cable 2

・After X=1, the following values are stored.

X Crank Block Button Block Key Block Other
1 Rotation Speed Flag Flag 0
2 0 Push Amount Twist Amount 0
3 0 0 Insertion Direction 0

・The rotation speed of the Crank Block is a value of -1 to 1, and is stationary at 0.
・Button Block flags are as follows.

bit0 Pressed
bit1 Moment of Pressing

・The push amount of Button Block is 0 to 1.0. 0 is not pressed at all.
・The Key Block flag is at the moment the knob is released with 1 and is not released with 0.
・The twist amount is 0 to 1.0. 0 is not twisted at all.
・Insertion direction is 0 or other, and displays whether the Key Block is inserted vertically or horizontally.

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
|