CustomControls! Works/new Demo Cap/fixes 360 analog problems

This forum is currently in read-only mode.
0 favourites
From the Asset Store
JPEG format 364x HD backgrounds in 2688 x 1536 Resolution
  • New Customizable Controls plugin

    • Change your key settings at runtime.
    • Works with built in behaviors.
    • Customize all controls for your games: mouse, keyboard, and XBox360 controls.
    • Display set keys for Key, Mouse, and Pad controls, or use images for XBox 360 Pad buttons.
    • Save and Load Controller Configurations to Disk.

    Fixes some Construct 99.4 glitches to hold you over till the next build

    • Fixes Glitch where fourth 360 Pad isn't Detected.
    • Fixes Glitch where Right Analog Stick Up isn't Detected.
    • Has a working Set Control State action.

    Now fixes 360 pad issues where pressing to the left or right slightly on analog thumbstick will sometimes also trigger up and down movements

    <img src="http://dl.getdropbox.com/u/1013446/Captur55e.png">

    DOWNLOAD PLUGIN AND EXAMPLE CAP

    FOR THE LAZY FOLKS, HERE'S AN EXE VERSION

    Microsoft Permissive License.rtf

    The button images contained in the CAP file inside the rar file on this page are bound to the Microsoft Permissive License (Ms-PL).

    these button images are downloadable here.

    To use this cap:

    • click on the name of a control
    • the next thing you press will be set as the button

    example cap is tutorial

    please report if there are any bugs

    also, please tell me your thoughts on the button image system

    I'm considering making it work with sprite frames

    but I'd like to hear scirra's thoughts

    -----------------

    quick tips

    -----------------

    to set default controls for your game

    • make a cap where the player can set controls
    • temporarily make it save to the filename "default" (or whatever you want to call it)
    • load your game, and set the keys, and save
    • then change the cap so it no longer saves to "default", and it saves to "user"
    • you can then choose when to load your defaults as necessary

    How do I show the player what button is set?

    The ControlString(control name, player number) expression returns a string for the name of a set key

    for instance

     Set Text to : CustomKeys.ControlString("Move Left",1)[/code:25l3013g]
    would set the Text to [i]"Left Arrow"[/i] if that was the button set for Player [i]1[/i]'s [i]"Move Left" [/i]control
    The [b]Set Control Sprite[/b] and [b]Show Control Sprite[/b] Actions allow you to display an image for an xbox 360 control
    
    [h2][u]what if I want it to say [i]Mouse1[/i] instead of [i]Left Mouse Button[/i], or [i]Enter[/i] instead of [i]Return[/i]?[/u][/h2]
    the[b] Set Control String[/b] action allows you to overwrite the name of a control, so you can make it say "LMB" instead of "left mouse button" or whatever you want
  • I love you.

  • good work lucid

  • freakin awesome! thanks Lucid

  • Hmm... I'm having trouble trying to get my game project to accept the xbox controller input with this new plugin. It was working fine with the customkeys plugin...

    I removed the event conditions pertaining to the old plug-in, then deleated the it from my layouts, then added the new plugin to the laout, and replaced the events to use the new plugin.

    Your example CAP works fine when I run it, and I'm loading in the same CK file that I save while running the example CAP. (placed in the same folder as my game)

    With the old plug in you had to "add" controls. It seems that's not the case now... are their names set in stone, or set only by reading the CK file?

    Do

    I merely have to load the CK file and then make sure the "control"s that I refer to are exactky the same name in my events. I'm doing that but it wont respond to the control pad, but like I said, the example CAP works fine and does respond to the control pad.

    Is it possible theres an issue with my cap because I had the old version of the plug in in there first?

  • you no longer need to add controls through events

    but you do have to add them the way you normally do in construct:

    (through the application properties pane)

    <img src="http://dl.getdropbox.com/u/1013446/Captur522e.PNG">

    try adding the controls you want here, and let me know if it works

    the plugin will automatically obey only keys set by the plugin

    so you can set the actual buttons you want here in the properties pane,

    they will be ignored

    just create the names of the controls you want like "Move Left", etc

  • Things are getting worse. I just noticed this morning (having not changed your example CAP at all, that when I run it it works fine to set controlls, and the player sprite responds to the controls, BUT as soon as I load the CK file by clicking load it no longer responds to the controls!

    Am I the only one having dificulties ?

    EDIT:

    I just keep running your example CAP and half the time the sprite resonds to the controls I gave it and alf of the time it does not! Sems to never work after loading but I swear yesterday it was fine after loading with your CAP.

  • Think I fugured out the problem. I'm using a newer version of construct than the example CAP was made in. (found out when I went to save changes)

    It seems what's happening with the latest version of construct and this plug in is that the plugin works for built in movements of sprites but NOT for costom input events where you want to make something happen when a "control" is pressed. those don't respond at all. Even in the example CAP, I tried a simple event to make the sprite fire the bullette and it didn't happen... and half the time I run the CAP the sprite doesnt respond to ANY input at all.

  • im not at home to check out the problem

    but as i stated in the original post

    there is something wrong with construct ui buttons. this isnt just with my plugin, but if you press a button, it disables all controls.. if you replace those buttons with sprites, or some other method, this wont happen.. i will upload a new cap when i get a chance.

    also, (as stated in original post), the cap is corrupt. it is fine for testing the plugin, but each time you save it, it saves to a larger cap file, which creates a larger, less responsive exe.

    unfortunately, i havent yet uploaded the cap file, as i stated i would in the original post. but i will soon

    if you get a chance to test this in a fresh cap, without the button object, please let me know if you still have problems

    also, let me know if you were using the "on control" conditions in this plugin, or the ones in mouse/keyboard

    and thx for using the plug

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I was using the "control is pressed" in the plugin, not the mouse/keyboard. It does not work in a my game or in your example CAP on my system with version 0.99.42 vof construct. I'll try a fresh CAP soon.. What version of Construct did you create the example CAP with?

    Thanks

  • do we know if Construct will have compatibility for other types of controllers in the future, not just 360?

  • I apologize for the lack of progress everyone

    really at an important part of my personal project though

    and I need to take advantage of some unanticipated free time while I have it

    but I promise I haven't given up on perfecting 360 controls

    just give me some time

    and yes, I did copy/paste, but don't take that as insincerity

    also alspal, david said directx controls were coming in the future

  • I was using the "control is pressed" in the plugin, not the mouse/keyboard. It does not work in a my game or in your example CAP on my system with version 0.99.42 vof construct.

    use new link in original post

    problem fixed

    thanks for reporting it

    also, I was going to ditch the deadzone tweaks I had added to the 360 controls because I thought that was fixed in this version. there should be an update soon that fixes those problems where you press left and it goes up.

    also, I'm going to change the way you set images for 360 controls

    it's a ridiculous pain. tell me what you think of this system

    you load all the images into an animation, so you can just import them from a directory

    there is a specified order you put them in, and then you just tell it which sprite it is

    you will also put blank frames if you're missing an image or don't wish to include one.

    it is a slight inconvenience to have to rearrange all the frames in the animation editor to the correct order, but nowhere near as annoying as loading all the sprites individually, or setting up individual actions for each image

    what do you think?

  • Uh... The new version pretty much broke everything. I managed to revert back to the old version of the plugin just to get things to actually work.

  • what does "broke everything" mean?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)