BoxSymbol Clock.png
This is an archive.
See the new ClickWiki at https://clickwiki.github.io. This version is just an archive for the purposes of migrating content to the new structure.


Jump to: navigation, search

Joystick Control object

Icon Joystick Control object.png
Author Official extension or is supported by Clickteam.
Status Released
Release Date Unknown
Last Updated {{{LastUpdated}}}
Available for Multimedia Fusion 2 Standard Multimedia Fusion Developer 2 Clickteam Fusion 2.5 Free Edition Clickteam Fusion 2.5 Standard Clickteam Fusion 2.5 Developer
Supported Runtimes iOS Runtime Android Runtime HTML5 Runtime XNA Runtime (now deprecated) UWP Runtime
License Free
Attributes {{{Attributes}}}
Download
Includes Examples No
Includes Help Files Yes
Links
Downloadable via the Extension Manager
Included by default.
Alternates {{{Alternates}}}

The Joystick Control object is an invisible object that allows you to manually control the joystick on an iOS, Android, HTML5, XNA, or UWP application. The joystick can be set to either be a touch joystick, or driven by the accelerometers. You can also set the position of the joystick and buttons on the screen.

Please note that for the Joystick Control object to work, you need to set the Joystick / Device property in the exporter section in the frame properties. to "Controlled by an extension". If you do not, the object will have no effect.

Actions

Start accelerometer joystick

Starts the accelerometers and the processing of them: you will be able to move your object by orienting the device.

Stop accelerometer joystick

Interrupts the accelerometer joystick.

Start/stop touch joystick

Starts or stop the touch joystick and the fire buttons. This action asks for 4 parameters:

  • Joystick

Enter 1 to display the joystick, 0 to hide it.

  • Button 1

Enter 1 to display button 1, 0 to hide it.

  • Button 2

Enter 1 to display button 2, 0 to hide it.

  • Left handed

Enter 1 for a left-handed display (joystick on the right), 0 for right-handed.

Set joystick position

Allows you to fix the position of the joystick on the screen.

Set joystick X coordinate

Set joystick Y coordinate

Allows you to fix the X and Y coordinates of the joystick.

Set button 1 position

Allows you to fix the position of button 1 on the screen.

Set button 1 X coordinate

Set button 1 Y coordinate

Allows you to fix the X and Y coordinates of button 1.

Set button 2 position

Allows you to fix the position of button 1 on the screen.

Set button 2 X coordinate

Set button 2 Y coordinate

Allows you to fix the X and Y coordinates of button 2.

Set joystick mask

This action allows you to mask the input of the joystick. You have to provide a binary mask used to calculate a logical AND between the joystick input and the mask. The inputs are coded as following:

  • %000001: top
  • %000010: bottom
  • %000100: left
  • %001000: right
  • %010000: fire 1
  • %100000: fire 2

For example, a mask of 3 (%11) will only allow up and down movements...

Expressions

Touch Joystick

Retrieves the current coordinates of the joystick. A large negative number is returned if you ask for the position of the joystick when it is not displayed.

X coordinate

XJoystick( "Joystick Control object" )

Y coordinate

YJoystick( "Joystick Control object" )

Button 1

Retrieves the current coordinates of first button. A large negative number is returned if you ask for the position of the button when it is not displayed.

X coordinate

XFireOne( "Joystick Control object" )

Y coordinate

YFireOne( "Joystick Control object" )

Button 2

Retrieves the current coordinates of second button. A large negative number is returned if you ask for the position of the button when it is not displayed.

X coordinate

XFireTwo( "Joystick Control object" )

Y coordinate

YFireTwo( "Joystick Control object" )


Contributors to this page

Advaith (100.0%)