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

New releases and general discussions.

Post » Wed Aug 19, 2009 12:42 am

[size=150:25l3013g]New Customizable Controls plugin[/size:25l3013g][size=130:25l3013g]
[list:25l3013g][*:25l3013g]Change your key settings at runtime.[/*:m:25l3013g]
[*:25l3013g]Works with built in behaviors.[/*:m:25l3013g]
[*:25l3013g]Customize all controls for your games: mouse, keyboard, and XBox360 controls.[/*:m:25l3013g]
[*:25l3013g]Display set keys for Key, Mouse, and Pad controls, or use images for XBox 360 Pad buttons.[/*:m:25l3013g]
[*:25l3013g]Save and Load Controller Configurations to Disk.[/*:m:25l3013g][/list:u:25l3013g]
Fixes some Construct 99.4 glitches to hold you over till the next build
[list:25l3013g][*:25l3013g]Fixes Glitch where fourth 360 Pad isn't Detected.[/*:m:25l3013g]
[*:25l3013g]Fixes Glitch where Right Analog Stick Up isn't Detected.[/*:m:25l3013g]
[*:25l3013g]Has a working Set Control State action.[/size:25l3013g][/*:m:25l3013g]
[*:25l3013g][size=155:25l3013g][color=#800000:25l3013g]Now fixes 360 pad issues where pressing to the left or right slightly on analog thumbstick will sometimes also trigger up and down movements[/color:25l3013g][/size:25l3013g][/*:m:25l3013g][/list:u:25l3013g]

[size=150:25l3013g][color=#408000:25l3013g]DOWNLOAD PLUGIN AND EXAMPLE CAP[/color:25l3013g][/size:25l3013g]
[color=#BF40FF:25l3013g][size=145:25l3013g]FOR THE LAZY FOLKS, HERE'S AN EXE VERSION :mrgreen:[/size:25l3013g][/color:25l3013g]

Microsoft Permissive License.rtf
[size=50:25l3013g]The button images contained in the CAP file inside the rar file on this page are bound to the Microsoft Permissive License (Ms-PL).[/size:25l3013g]
these button images are downloadable here.

[size=150:25l3013g]To use this cap:[/size:25l3013g]
[size=135:25l3013g][list:25l3013g][*:25l3013g]click on the name of a control
[/*:m:25l3013g][*:25l3013g]the next thing you press will be set as the button[/*:m:25l3013g][/list:u:25l3013g][/size:25l3013g]

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



-----------------[u:25l3013g][size=150:25l3013g]quick tips[/size:25l3013g][/u:25l3013g]-----------------
[u:25l3013g]to set default controls for your game[/u:25l3013g]
[list:25l3013g][*:25l3013g]make a cap where the player can set controls[/*:m:25l3013g]
[*:25l3013g]temporarily make it save to the filename "default" (or whatever you want to call it)[/*:m:25l3013g]
[*:25l3013g]load your game, and set the keys, and save[/*:m:25l3013g]
[*:25l3013g]then change the cap so it no longer saves to "default", and it saves to "user"[/*:m:25l3013g]
[*:25l3013g]you can then choose when to load your defaults as necessary [/*:m:25l3013g][/list:u:25l3013g]

[u:25l3013g][size=100:25l3013g]How do I show the player what button is set?[/size:25l3013g][/u:25l3013g]
The ControlString(control name, player number) expression returns a string for the name of a set key
for instance[code:25l3013g] Set Text to : CustomKeys.ControlString("Move Left",1)[/code:25l3013g]
would set the Text to "Left Arrow" if that was the button set for Player 1's "Move Left" control
The Set Control Sprite and Show Control Sprite Actions allow you to display an image for an xbox 360 control

[size=100:25l3013g][u:25l3013g]what if I want it to say Mouse1 instead of Left Mouse Button, or Enter instead of Return?[/u:25l3013g][/size:25l3013g]
the Set Control String 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
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Wed Aug 19, 2009 1:31 am

I love you.
B
6
S
2
G
3
Posts: 520
Reputation: 2,690

Post » Wed Aug 19, 2009 7:35 am

good work lucid
B
134
S
65
G
16
Posts: 1,765
Reputation: 19,188

Post » Fri Aug 21, 2009 9:08 pm

freakin awesome! thanks Lucid
B
2
S
2
G
4
Posts: 124
Reputation: 1,698

Post » Sun Aug 23, 2009 8:58 pm

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?
B
2
S
2
G
4
Posts: 124
Reputation: 1,698

Post » Sun Aug 23, 2009 9:46 pm

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)



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
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Mon Aug 24, 2009 9:10 am

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.
B
2
S
2
G
4
Posts: 124
Reputation: 1,698

Post » Mon Aug 24, 2009 11:04 am

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. :(
B
2
S
2
G
4
Posts: 124
Reputation: 1,698

Post » Mon Aug 24, 2009 1:40 pm

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
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Mon Aug 24, 2009 1:51 pm

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
B
2
S
2
G
4
Posts: 124
Reputation: 1,698

Next

Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 4 guests