User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12

Thread: Stupid Question: Any way to change which joystick buttons are which?

  1. #1
    Clicker Fusion 2.5
    Del_Duio's Avatar
    Join Date
    Sep 2008
    Location
    Cygnus X-I
    Posts
    919
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Stupid Question: Any way to change which joystick buttons are which?

    For that I mean, in the game I'm making it uses all 4 buttons of the joystick object.

    So I did a ton of work with stuff like 'If joystick button 2 is pressed then (attack)", if joystick button 1 is pressed (jump), and etc etc.
    Now multiply this x 1000 or so over the course of the application.

    And then I tried it with a gamepad, and though yes it does work I've noticed that it doesn't have the same conventional control feel of most games nowadays (ex. the "X" button is the main action, or the "B" button is the cancel, and so on).

    So is there any way to have MMF2.5 somehow recognize everywhere there's a 'Joystick Button 1' = "Joystick Button 3" instead, and things like that?

    It's not like somebody COULDN'T get used to the control scheme- as I said, it does work- but if I could make it feel more normal to the feel of current gen systems controls that'd probably be a good idea.

  2. #2
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleInstall Creator Pro

    Join Date
    Dec 2010
    Location
    United Kingdom
    Posts
    960
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sadly, Fusion doesn't have a "Search & Replace" feature. It has a "Find" one from the "Edit" menu though, which might be a bit tedious replacing by hand.

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,155
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    Remapping joystick buttons in the same way as keyboard input is changeable from "default controls" would also be very handy.
    I guess it's not doable for joysticks?
    (I don't have one, I don't see the button configuration window popping out when joystick input is selected,
    wonder if it eventually pops out with joystick detected..?)

    Maybe because user would remap their own joysticks from their specific drivers?
    That's only possibly true for computer users anyway.

    (don't own a joystick since Tie Fighter so forgive any uncorrect/aged assumption on the matter )

  4. #4
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleInstall Creator Pro

    Join Date
    Dec 2010
    Location
    United Kingdom
    Posts
    960
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I guess it's not doable for joysticks?
    Nope. The "joystick" hardware have fixed button IDs -- You'd be able to see which button is activated when testing them in Game Controllers from the Control Panel.

    For an Xbox 360 controller, for instance:
    Button 1 = A
    Button 2 = B
    Button 3 = X
    etc
    (Just a guess, that might not be the real mapping...)

    It might be possible to "re-map" them with third party software though...

    Or, it could be possible if you add and modify your events in Fusion to allow the player to choose their own mappings. Such as "Jump" => Button 4.
    Although thinking about it, that may also depend on the active object's movement, the property for a platformer is hard coded: "Jump on Button 1"

  5. #5
    Clicker Fusion 2.5
    Del_Duio's Avatar
    Join Date
    Sep 2008
    Location
    Cygnus X-I
    Posts
    919
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Ah crap, thanks guys sorry it took so long to get back to this topic

    I could try and replace them all by hand but there's seriously thousands of instances (at least) and I didn't want to accidentally forget if I swapped one out or not. The main thing would be the Attack button, which to me and my testers feels more "right" if it's the X button.

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,155
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    That's probably something you would have better thinking from scratch, unfortunately

    I'm probably going for the future to test something along this line:

    pressed fire 1 = set keypress("key_mapping") to fire_1("mapping")
    pressed fire 2 = set keypress("key_mapping") to fire_2("mapping")
    etc.

    then instead of coding "on keypress" events,
    I would be doing something like:

    keypress("key_mapping") = 1
    >>> do stuff

    keypress("key_mapping") = 2
    >>> do stuff

    bottom of code:

    keypress("key_mapping") <> 0
    >>> set keypress to 0


    I'm referring to an additional object, named "key_mapping",
    but this can be as well global values (so they would also be cross-frame)

    So, in this values,
    you would be able to remap functions assigned to fire buttons for joystick too:

    fire_1 = 2
    fire_2 = 1

    etc.

  7. #7
    Clicker Fusion 2.5
    Del_Duio's Avatar
    Join Date
    Sep 2008
    Location
    Cygnus X-I
    Posts
    919
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Yeah trust me if I was using a gamepad from the very start for this I would have switched it right then for sure. I guess that's how we learn, right?
    As it is, well I suppose even the old NES games had "B" for the attack button for some games (Metroid, IIRC) so it won't be all that bad.

    Thanks, buddy!

  8. #8
    Clicker Multimedia Fusion 2HTML5 Export Module
    Kentronisk's Avatar
    Join Date
    Nov 2011
    Posts
    206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Having global values representing the button number/id is what I always use. Here is a list of all the keys and their key code:
    http://help.adobe.com/en_US/AS2LCR/F...=00000520.html

    Then, save global values like Name: LEFT, value: 37. Lastly, use an object that are able to convert this number into a keypress, like Control X:
    Player presses key value "LEFT"
    I guess this is sort of what schrodinger said :b
    This is great for a few reasons, mainly to prevent an issue like you have from happening, but also to let the player easily be able to make his own controls. If he dont like the default buttons, he can easily keybind it however he wants. This requires an extension that reads key presses from values though, and does not work with the default, builtin control (unless its changed now, I have not used this ever since I found out about extensions :P).

    For my next game, I am gonna look into global events, and see if its a chance of having this stuff in one - and one only - place.

    In conclusion: Its very smart to save these values in one place. Other values I also save in global values are speed, jump strength, gravity, shooting speed, etc (these are also a pain to switch if you suddenly decide that your character should jump 1 pixel lower, for whatever reason).

  9. #9
    Clicker Fusion 2.5Fusion 2.5+ DLC
    casleziro's Avatar
    Join Date
    Mar 2013
    Location
    United States
    Posts
    647
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    EDIT: Ah, I did misunderstand, my bad
    Images attachées Images attachées

  10. #10
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,155
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Kentronisk View Post
    Having global values representing the button number/id is what I always use. Here is a list of all the keys and their key code:
    http://help.adobe.com/en_US/AS2LCR/F...=00000520.html

    Then, save global values like Name: LEFT, value: 37. Lastly, use an object that are able to convert this number into a keypress, like Control X:
    Player presses key value "LEFT"
    I guess this is sort of what schrodinger said :b
    This is great for a few reasons, mainly to prevent an issue like you have from happening, but also to let the player easily be able to make his own controls. If he dont like the default buttons, he can easily keybind it however he wants. This requires an extension that reads key presses from values though, and does not work with the default, builtin control (unless its changed now, I have not used this ever since I found out about extensions :P).

    For my next game, I am gonna look into global events, and see if its a chance of having this stuff in one - and one only - place.

    In conclusion: Its very smart to save these values in one place. Other values I also save in global values are speed, jump strength, gravity, shooting speed, etc (these are also a pain to switch if you suddenly decide that your character should jump 1 pixel lower, for whatever reason).
    Seems like an interesting method Kentronisk!

    The one I depicted above is a similar concept,
    but was intended to work without extensions and with the default controls.
    Actually, it was just an idea and I never tested its pro-cons...
    and if it really works

Page 1 of 2 1 2 LastLast

Similar Threads

  1. size of the joystick and buttons
    By neurone77 in forum Android Export Module 2.5
    Replies: 4
    Last Post: 16th August 2014, 10:40 PM
  2. Simulate Joystick Buttons
    By klikhappy in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 2nd August 2013, 01:15 PM
  3. Buttons and Joystick Disappearing
    By TechEdDiva in forum iOS Export Module Version 2.0
    Replies: 8
    Last Post: 2nd November 2011, 10:38 PM
  4. Joystick Buttons position.
    By Evilized79 in forum iOS Export Module Version 2.0
    Replies: 2
    Last Post: 25th July 2011, 05:10 AM
  5. Using a joystick with more then 4 buttons
    By Paul_Boland in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 27th May 2010, 09:28 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •