1. joystick [index] [dir]shaken?
Determines whether the specified joystick is pushed in the specified direction
How to Use
A joystick can be used to control the moving direction of an object.
The number in this block indicates the place of a joystick among the ones connected to Halocode. As shown in the following
figure, the number 1 indicates the first joystick connected to Halocode, 2 indicates the second one, and so on.
The following figure shows the directions and value ranges of the joystick.
Note: This is a Boolean block that contains a condition. Use it in combination with another block that requires a condition.
Example
After you press the space key, the LED matrix displays the image “↑” if you push the joystick upward.
Note: Ensure that you have connected an LED matrix to Halocode.
2. joystick [index] [axis] value
Reports the position value of the specified joystick on the specified axis
How to Use
The following figure shows the x and y axes of the joystick and the value ranges.
You can select the check box on the left of this block to see the position value of the joystick on the x or y axis on the stage.
Note: This is a reporter block that must be used in combination with another block requiring data.
Example
After you press the space key, the LED matrix displays the position value of the joystick on the y axis.
Note: Ensure that you have connected an LED matrix to Halocode.