User Tag List

Results 1 to 10 of 10

Thread: Rebindable Keys / D-Pad acceptance?

  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)

    Rebindable Keys / D-Pad acceptance?

    Hey there!

    I'm working on a new game and it's coming out pretty cool, however this time I'd like to address some player concerns from my past efforts before the game is too far along. One of these is having rebindable keys. I see that you can set certain control keys using the default joystick object however it looks like you can only do that at design time and not at run time (which is what I'd need). I tried using the Joypad 2 extension but there doesn't appear to be any way to set control keys at all with it.

    So how would one go about having the player be able to choose which keyboard presses he wants to use to play the game using MMF?


    P.S: Also while I'm here is there any way for the default controls to accept D-Pad presses? It'd be nice to use my 360 controller's D-Pad however it only seems to recognize the right analogue stick.

    Thanks for your help!

  2. #2
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,283
    Mentioned
    26 Post(s)
    Tagged
    0 Thread(s)
    For keyboard you would use the Control X object to check for key presses. This would be instead of using the build in “if key is pressed” conditions. Control X allows you to check a key based on a string. I would set up global strings to contain your player input keys and just make a ui that allows them to change those strings.

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCHTML5 Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    chrilley's Avatar
    Join Date
    Jul 2006
    Posts
    941
    Mentioned
    16 Post(s)
    Tagged
    1 Thread(s)
    Also The Joystick 2 Object can detect D-Pad input through the "Point of View" conditions and expressions. I am not sure if it'll work for every controller but my Xbox 360 controller responds to it at least. The input data is in degrees though so there's that...

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleXNA Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    piscesdreams's Avatar
    Join Date
    Dec 2007
    Location
    United States
    Posts
    928
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    I'm using Control X, Joypad 2 (for direct input controllers) and the Xbox controller extension (for x-input controllers), all depending on what the player has plugged in (or not). They work pretty well too, they just take some getting used to. I've just got the game setup to detect if a controller is detected, if so, is it an xbox controller? If not, then it treats it as a direct input controller. If nothing is detected then Control X is used. All my event groups are switched on and off depending on what is detected.

  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)
    Good lord Piscesdreams! So what do you do? Have three copies of every event line when a Control is needed? That sounds like a huge pain in the ass.

    Thanks about the ControlX advice, is seen it on the the extension list before but didn't get it. So I'd just use it for every instance of where I normally have the default joystick conditions you say?

    The controls aren't super complicated but it does use all 4 face buttons and ideally I'd like to use the shoulder buttons for fast weapon swaps if possible.

  6. #6
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,283
    Mentioned
    26 Post(s)
    Tagged
    0 Thread(s)
    The short answer is that, yes, you need 3 conditions per input. It isn’t any more of a pain in the ass than most things. I usually separate each condition by an OR(logical) so that it all sits on a single event line but you can separate them to their own lines if necessary.

  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)
    Mobichan, how exactly do the "OR" conditions work? I've tried using them in the past but never got the desired results. As someone who did a lot of programming with BASIC in the past I loved the idea of having an OR Command again but they don't seem to be the same thing.

  8. #8
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,283
    Mentioned
    26 Post(s)
    Tagged
    0 Thread(s)
    the OR(logical) condition is a separator for the conditions above and below it. In the example:

    +Alterable Value A = 0
    OR(logical)
    +Alterable Value B = 0
    -- Do Action

    This would execute the Action if Alterable Value A = 0 or Alterable Value B = 0. But it would only require one of these conditions to be true. It is the same as doing the following:

    +Alterable Value A = 0
    -- Do Action

    +Alterable Value B = 0
    -- Do Action

    The advantage of using OR(logical) is that even if both of the Alterable Values are 0, the Action will only execute once.

  9. #9
    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)
    That's awesome and would be perfect for multiple control inputs. Thanks a lot!!

  10. #10
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleXNA Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    piscesdreams's Avatar
    Join Date
    Dec 2007
    Location
    United States
    Posts
    928
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Del_Duio View Post
    Good lord Piscesdreams! So what do you do? Have three copies of every event line when a Control is needed? That sounds like a huge pain in the ass.

    Thanks about the ControlX advice, is seen it on the the extension list before but didn't get it. So I'd just use it for every instance of where I normally have the default joystick conditions you say?

    The controls aren't super complicated but it does use all 4 face buttons and ideally I'd like to use the shoulder buttons for fast weapon swaps if possible.
    Unfortunately, pretty much. It isn't that bad though. I just have Control X, Joystick 2 and Xbox in their own event groups and activate as needed. You can also do it as Mobichan suggested with an OR (logical) condition, but in my case my conditions were so huge I wanted to break them down where it didn't take an entire screen to read them, as seen here. It was also beneficial to only use the conditions needed (in their own groups instead of the OR (logical) condition) since I have to parse a lot of data with each input. This helps organization and just keep the overhead minimal when reading the conditions.



    Control X would be used for your keyboard inputs and Joystick 2 would be for controllers that are not X-Input based, which are Xbox 360/Xbox One controllers.

Similar Threads

  1. What are DRM keys?
    By DokieMaster in forum Fusion 2.5
    Replies: 2
    Last Post: 30th January 2018, 12:55 AM
  2. Control X and rebindable keys
    By J3sseM in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 11th March 2015, 03:17 AM
  3. Rebindable keys?
    By LemonyLime in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 11th March 2012, 09:29 AM
  4. Debugger keys
    By Armoured in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 11th February 2010, 06:36 PM
  5. accelerator keys aka hot keys don't work
    By Gitaarheld in forum Install Creator and Patch Maker
    Replies: 1
    Last Post: 23rd February 2009, 10:05 AM

Posting Permissions

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