[Plugin] Keycode

Post your completed addons to share with the community

Post » Sat Jan 21, 2012 7:40 pm

@smitchell, I guess I could do that, but perhaps Wastrel's idea would be easier?

Wastrel, I don't really NEED anything now, or at all really. It would just be really awesome for C2 devs to have an easy way to let users have customized controls. I have a lot of trouble deciding on what keys to use in my games, because I don't know what people want to use. If this worked, it would eliminate that ordeal and make a lot of people happy.

If you think this KeyboardPlus thing would work, then I'd really appreciate it if you could try it. Don't feel like you HAVE to, but if you have time...
B
20
S
9
G
6
Posts: 607
Reputation: 6,112

Post » Sat Jan 21, 2012 7:49 pm

@SullyTheStrange,
Yeah I know it would be LONG!!! But its something you'll have to do if you really want it in your game . I might do this in mine aswell. But i'll leave it to a last min thing cause its going to make me hate my life

Why dont you ask @Ashley if he can implement this into C2 somehow?
B
29
S
12
G
7
Posts: 740
Reputation: 7,839

Post » Fri Apr 27, 2012 4:49 pm

this is a great plugin for direct access to keyboardinput, really need something like this, i was planning on using it for direct output to text element, so its really a shame it doesnt work in chrome, would be great if it could be integrated in official keyboard plugin
ImageImage
B
61
S
19
G
6
Posts: 809
Reputation: 9,028

Post » Sun Apr 29, 2012 1:15 am

Wait, how do you use this to create custom controls? From what I saw it only have the equivalent of the "on key pressed" and no "key is down"
B
83
S
21
G
15
Posts: 1,039
Reputation: 15,129

Post » Sun Apr 29, 2012 1:46 am

this plugin can capture every keyboard input, its no trigger, you would put the pressed key into a variable and with that you could make custom controls
ImageImage
B
61
S
19
G
6
Posts: 809
Reputation: 9,028

Post » Sun Apr 29, 2012 4:32 am

That's exactly what I did:

Global variable keyLeft = 37 (means left arrow)
> Start of layout: start capture

> Keycode.ScanCode = keyLeft: go left

It works, but the object keeps going left forever, because the Keycode.ScanCode only changes once I press another key
B
83
S
21
G
15
Posts: 1,039
Reputation: 15,129

Post » Sun Apr 29, 2012 5:38 pm

i dont think this plugin will work for what you want to do, it only captures the key, like you said it doesnt account for the different keysstatus

the construct keysetting should be by variable, then this capturing of keystrokes could be used to replace these variables.

but it would also be usefull for textgames en direct textinput without inputfield.
ImageImage
B
61
S
19
G
6
Posts: 809
Reputation: 9,028

Post » Mon Apr 30, 2012 2:18 pm

[QUOTE=vtrix]but it would also be usefull for textgames en direct textinput without inputfield. [/QUOTE] This was my primary reason for creating this plug-in in the first place. At the time, there was limited support for text entry. I was also looking at a way to be able to set custom key mappings, e.g. allow the player to reset movement from WASD to something else, in game. This would then allow the constructor to set a variable, and check that variable using the built-in keyboard functions. It was never meant to replace movement using the keyboard plug-in.

Since then, new features/plug-ins have been introduced which pretty much address these issues. I still think this plug-in might be useful in some situations, but it does not interact well with the keyboard plug-in. The keyboard plug-in basically overrides the keycode functionality.

IMO, the best option would be for @Ashley to include the keycode functionality in the keyboard plug-in, when he has time, and if the need still exists. Wastrel2012-04-30 14:19:21
Don't see the fnords and they won't eat you!
B
75
S
16
G
12
Posts: 322
Reputation: 11,608

Post » Thu Jun 14, 2012 9:48 pm

@Wastrel, what new features/plug-ins are you talking about in the above post? I've been busy with work for the past few months so I haven't kept up with C2 updates, and now that I'm getting back to my game, I think the keycode plug-in isn't working correctly anymore.
B
20
S
9
G
6
Posts: 607
Reputation: 6,112

Post » Wed Aug 22, 2012 1:33 pm

Yeah I'd love it if @Ashley could just add this to the official keyboard one. Since the conflict between this and the keyboard plugin makes it useless. :(
B
134
S
65
G
16
Posts: 1,765
Reputation: 19,188

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: andykenobi and 2 guests