[↑]
SmileBASIC4 Replica Reference
CONTROLLER
1. Check controller type and connection status

CONTROLLER(ControllerID)

Argument

ControllerID

0 Default Controller
1 to 4 Normal Controller

・The normal controller ID corresponds to the number of player LED on the connected controllers.
・If the handheld mode controller can be used, the ID is always 1.
・The default controller combines the inputs of all connected controllers and always treats them as inputs equivalent to the handheld mode controller regardless of the currently set operation style.
・When using controller IDs 1 to 4, it is strongly recommended to set the operation style you want to use with the XCTRLSTYLE command in advance.

Return Value

0 Not Connected
1 handheld mode controller
2 Pro Controller
3 dual-controller grip
4 Joy-Con (L)
5 Joy-Con (R)
2. Check controller connection status and type

CONTROLLER ControllerID OUT ControllerType,MainColor,SubColor
CONTROLLER ControllerID OUT ControllerType,LeftMainColor,LeftSubColor,RightMainColor,RightSubColor

Argument

ControllerID

0 Default Controller
1 to 4 Normal Controller

・The normal controller ID corresponds to the number of player LED on the connected controllers.
・If the handheld mode controller can be used, the ID is always 1.
・The default controller combines the inputs of all connected controllers and always treats them as inputs equivalent to the handheld mode controller regardless of the currently set operation style.
・When using controller IDs 1 to 4, it is strongly recommended to set the operation style you want to use with the XCTRLSTYLE command in advance.

Return Value

Controller type

0 Not Connected
1 handheld mode controller
2 Pro Controller
3 dual-controller grip
4 Joy-Con (L)
5 Joy-Con (R)

MainColor,SubColor

Returns the controller color in two color codes, the main color and the sub color

・The obtained color code can be used as the color code for other drawing commands.
・If the controller is not connected, the main and sub will return black.

LeftMainColor,LeftSubColor,RightMainColor,RightSubColor

When dual-controller grip or handheld mode controller are used, the left and right controller colors can be acquired separately.

・Black is returned to the right main color and the right sub color when it is held horizontally and held vertically.

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
|