[PLUGIN] Input System v0.96b (21/03/2011): Keyb+Mouse+Joy Forum Home > Construct Classic > Construct Classic Discussion > Work-in-progress addons |
Post Reply
|
Page <1234 9> |
| Author | |
Post Options
Quote Reply
Posted: 14 Oct 2010 at 8:22am |
|
|
I agree that preset thing is the most tricky part.
First you create your preset with "Set control default component", then you activate the presets with "Init control default component device" with optional Joystick number to use, because as you have only one keyboard and one mouse, there may be not only one joystick. After some thinking, I agree that it's a bit too complicated and I should rework that. So, First, I will rename "Set control default component" to "Set control preset" and "Init control default component device" to "Set presets joystick" Then, I will change the preset like this: - call "Set control preset", will init control directly and if it's a joystick, it'll take the first one available. - call "Set presets joystick" to set joystick to use for preset and to change the used joystick of previous presets. What do you think? |
|
![]() |
|
Post Options
Quote Reply
Posted: 14 Oct 2010 at 10:38pm |
|
|
Thanks for the clarification, and that does sound a bit easier to understand.
I guess what I was missing was the set default. One other question, once you've set up the arm control, can you use "InputSystem.GetControlConfigData" for the next layout? |
|
![]() |
|
Post Options
Quote Reply
Posted: 15 Oct 2010 at 7:55am |
|
|
GetControlconfigData primary goal is to have a string representation of configured controls that can be used, for example, to save the configuration on disk (see Input System3.cap). Then you use SetControlConfigData to set controls.
I didn't think of using this method to transfer controls data between two layouts, because I thought you'd rather have one InputSytem global to the application than one InputSystem for each Layout. So, it may and should work. If you try it, tell me if it's really working |
|
![]() |
|
Post Options
Quote Reply
Posted: 15 Oct 2010 at 11:19pm |
|
|
I did the global thing and it works perfectly
The change you mention sounds much clearer, although I can use it as it is with this clarification (yay!) |
|
![]() |
|
Post Options
Quote Reply
Posted: 15 Oct 2010 at 11:31pm |
|
|
[quote="madster":3jlzh3k5]I did the global thing and it works perfectly
The change you mention sounds much clearer, although I can use it as it is with this clarification (yay!)[/quote:3jlzh3k5] You should use last version, as actions' names have been modified in 0.91b. |
|
![]() |
|
Post Options
Quote Reply
Posted: 18 Oct 2010 at 5:27pm |
|
|
This is great! I saw this just now and have only tried the examples so far, but it works great.
Awesome work! |
|
![]() |
|
Post Options
Quote Reply
Posted: 20 Oct 2010 at 1:27am |
|
|
Is it possible to have multiple controllers control the same character? For example have the keyboard and joystick both control the player, so that a special option to switch schemes is unnecessary?
|
|
![]() |
|
Post Options
Quote Reply
Posted: 20 Oct 2010 at 7:37am |
|
|
No sorry, you have to manage that in your cap file.
In the plugin, one control is for one player and uses one device component (axis, button, pov, etc...). But, when I was designing the plugin, I thought of having a primary and a secondary component for the same control. But I changed my mind, because, firstly I don't think it will be often used and secondly this can be managed in the game by using 2 controls for the same action. |
|
![]() |
|
Post Options
Quote Reply
Posted: 21 Oct 2010 at 8:17pm |
|
|
Two questions:
1. How come your example will detect my joypad as input device #1 but in my project it detects it as #3, after keyboard and mouse? I've been looking at the code and there must be something I'm missing. 2. Is it really necessary to distinguish d-pad diagonals as seperate buttons? Is it not possible to just make it detect that I'm pressing left and up at once as seperate buttons? Otherwise it seems like a couple unnecessary events I'd need just for the joypad support and the current game engine. |
|
![]() |
|
Post Options
Quote Reply
Posted: 21 Oct 2010 at 9:16pm |
|
|
1. Your Joystick is the 3rd device (after mouse & keyboard) and the first joystick. In my example I use GetJoystickName with joystick number as parameter.
2. POV is made of 8 diferent directions events sent by DirectX. For example NorthWest is a separate event and not North+West events together. I hope it answered your questions. |
|
![]() |
|
Post Reply
|
Page <1234 9> |
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |