Tips
SmileBASIC Programming Tips
Open the Help
If you’re using the handheld mode, please touch the editor or direct mode area. The yellow frame will glow for a moment and you will be able to operate the editor/direct mode area. You can do the same if you have a mouse connected to it.
When a USB keyboard is connected, pressing Ctrl+TAB will make the yellow frame glow for a moment and you can control the editor/direct mode. Pressing Ctrl+TAB again will bring you back to the Help area.
Recommended usage of XCTRLSTYLE and Controller ID
It is possible to change the way of holding and the number of connections of Joy-Con with the XCTRLSTYLE command as you like, but when you use it in a strange place, the connection screen comes out every time you start from PLAYMENU and becomes annoying, or is dragged into the setting of the program that executed immediately before and will not be able to use with the way of holding that you want to use. So, we would like to introduce you to the official recommended usage.
First, decide how you want to hold it. It means that whether it's single play or multiple play, whether you want to use the gyroscope or an IR camera, whether you want to use Toy-Con.
If you don't want to use the gyroscope or IR camera in single play, don't use XCTRLSTYLE, or use XCTRLSTYLE 0. Then, it is recommended that you use controller ID No.0. Controller ID No.0 means “Regardless of the current XCTRLSTYLE setting or the number of Joy-Con connections, ID that can handle dual-controller grip, handheld mode, or Pro Controller can be used as it is.”
If you want to use the gyroscope in single play, call XCTRLSTYLE 1,0,1,0, and then use controller ID No.1. With this setting, you can use dual-controller grip, handheld mode, or Pro Controller.
If you want to use the IR camera in single play, call XCTRLSTYLE 1,1,0 or 1,1, and then use controller ID No.1. Note that when using the IR camera, it is always necessary to choose dual-controller grip. The third argument can be set as you like,
because the gyroscope can be used together.
For multiple play, XCTRLSTYLE maximum number of connections, any value between 1 and 3, 0 or 1,0.
The second argument determines the method of holding the controllers, and the third argument determines whether to use the gyroscope or not. Controller IDs will be used up to the maximum number of players.
In most cases, it should be one of the four patterns listed above. Other settings are also possible, so if you're a research-oriented person, please try them out. However, if you're making unusual settings, we recommend that you explain them to the user in a simple way!
When Toy-Con is used, the XCTRLSTYLE argument is completely different. Please see the reference. You will use the controller ID No.1 or later.
I want to show the mouse cursor while the program is running.
Normally, the mouse cursor does not appear while the program is running. If you want the mouse cursor to appear in the program, call SYSPARAM “MOUSECURSOR”, 1. This setting will be reset at the start of the next program execution.
Other Tips
About Nintendo Switch Online
SmileBASIC 4 lets you use the server functions (download, upload, and publish files) even if you are not a member of Nintendo Switch Online. So if there are no benefits to subscribing Nintendo Switch Online at all, there are, in fact. You can easily back up the programs you have created by using Save Data Cloud provided for Nintendo Switch Online members.
(* For information about Save Data Cloud, please see the Nintendo Switch Online instruction page of Nintendo Official Website.)