View Full Version : Transforming a 4 way in a 8 by a script ?
straffo
12th May 2004, 02:40 PM
After testing a bit my new brand fighterstick I find unnatural to have the POv where is placed I would better use the Hat2
Is it possible to check if (for example) if
B9 and B10 are pressed to send a command ?
look like to be possible but I've just have the idea and I cannot test yet being at work ...
Bob Church
12th May 2004, 04:03 PM
No. The hats are such that the adjacent sides won't close simultaneously, you can't get B9 and B10 at the same time.
- Bob
The StickWorks
http://www.stickworks.com
straffo
12th May 2004, 04:29 PM
damm :(
MichaelCHProd
12th May 2004, 10:44 PM
working on it.... I promise B)
straffo
13th May 2004, 07:38 AM
so Micheal it's more a driver "issue"* than an hardware limitation ?
* I've used quote because this word is perhaps a bit to strong ,my english is not allways the best .... I'm a frogman you know :D
MichaelCHProd
13th May 2004, 07:09 PM
no it is the plastic that holds the buttons. It's physical. :(
straffo
13th May 2004, 09:57 PM
ooops :)
Well I'll get used to the POV so ,wich is already almost the case.
I had to add some styrofoam on the base of the stick to up a bit my hand and have a better grip on the stick.
JNOV
18th May 2004, 11:31 PM
I think it is possible to write a script that would generate a logical "corner" when both of the adjoining switches are closed within a sufficiently short period of time. For example, to create a logical up-and-right corner output for Fighterstick Hat #1:
// Initialize interlocks
if (not b255) then
b255 = TRUE;
b1 = FALSE;
b2 = FALSE;
endif
// Start period timer when hat #1 is pushed up
timer(period, d1, 2) = js1.b5 and not b2;
sequence
wait(d1 and js1.b6); // satisfied if hat #1 pushed right before period timer runs
b1 = TRUE; // Interlock
cms.b1 = TRUE; // This is your logical up-and-right output
wait(not js1.b6); // hold until released
cms.b1 = FALSE;
b1 = FALSE;
endsequence
sequence
// generate the "up" output if held long enough
// i.e., we're not generating a logical corner
wait(not d1 and js1.b5 and not b1 and not b2)
cms.b2 = TRUE; // Assign your "up" keystrokes here
wait(not js1.b5)
cms.b2 = FALSE;
endsequence
// Start period timer when hat #1 is pushed right
timer(period, d2, 2) = js1.b6 and not b1;
sequence
wait(d2 and js1.b5); // satisfied if hat #1 pushed up before period timer runs
b2 = TRUE; // Interlock
cms.b1 = TRUE; // This is your logical up-and-right output
wait(not js1.b6); // hold until released
cms.b1 = FALSE;
b2 = FALSE;
endsequence
sequence
// generate the "right" output if held long enough
// i.e., we're not generating a logical corner
wait(not d2 and js1.b6 and not b1 and not b2)
cms.b3 = TRUE; // Assign your "right" keystrokes here
wait(not js1.b5)
cms.b2 = FALSE;
endsequence
I haven't tested this, but I think it should work. To use it, you'd just assign cms.b1 to produce whatever key sequence you want "up-right" on hat #1 to generate, cms.b2 to produce the key sequence you want "up" to generate, and cms.b3 to produce the key sequence you want "right" to generate. (You can't use the Fighterstick GUI to assign the "up" and "right" keystrokes, because you don't want to generate them if you're only pressing "up" and "right" in order to generate a corner.) You'd activate the logical corner by pressing either up-right or right-up in sufficiently quick succession.
- JNOV
straffo
19th May 2004, 07:33 AM
thanks :)
I will try tonight and post the result here
Btw Jnov do you plan to make you directX display utility available ?
JNOV
19th May 2004, 08:29 AM
Yes, and it would be great it you (and others) would test it! :)
I plan to make a (very) beta version of the genral utility (which can be configured to work with any games that use Direct3D8, e.g., IL2, Lock-On, CFS3, Warbirds?), along with a demo with the graphic and sound feedback files that I use in IL2, so people can just copy them to their hard drives, load my IL-2 Control Manager map (it is set up to send data to the feedback program to trigger the sound and graphic feedback events) and the CH Feedback configuration file so they can see an example of how it can work. (I figured that most people have IL2.) Configuration is via an XML file (not unlike Shoot's configuration, if you've ever used that voice command software).
I think that the core files are ready to go, but putting together documentation is going to take a bit of time, but not too much time, I hope! When it's ready, I'll either provide a download link in the forums or Revvin (thank you) will make the files available from the CH Hangar.
I've spent a few three or four hour sessions using the feedback (graphics, recorded wav files, and synthesized text-to-voice) in IL2 FB with no crashes or other perceivable ill effects, so I hope that others will have luck with it as well.
Actually, the synthesized voice is pretty cool, because all you've got to do is provide text in the configuration file and the system will "say" it upon receipt of the triggering data from the HOTAS. There's no need to record a wav file or create graphics, so you can get up and running quickly. I didn't think I'd like it, but now if I play IL-2 without the feedback system loaded, I miss hearing "War emergency power!" every time I engage WEP.
As soon as I get this demo packaged up and out the door, I'm going to start working on extending the display utility to earlier versions of DirectX (e.g., for Falcon4 and Aces High), DirectX 9 (which no sims that I know of use yet, but Aces High 2 and other future sims will), and finally (maybe) OpenGL. Unfortunately, as far as I can tell, there is no way to avoid the dependency on the graphics DLL that a game uses, but if the feedback works for a particular game with one version of DirectX loaded, upgrading to a different version shouldn't break anything, because the game will load the same DLL under the upgraded version of DirectX.
(The wav-file and synthesized-voice feedback will work with any game right now, or even outside of a game, as they do not depend on DirectX. So, if you wanted to set up an audio feedback profile for Aces High or Falcon 4, you could.)
I hope that script works for you.
Best regards,
JNOV
MichaelCHProd
19th May 2004, 05:35 PM
I can't wait :thumbsup:
JNOV
20th May 2004, 02:41 AM
Sorry, Straffo, there were a couple of syntax errors and a couple of stupid mistakes in the script (I should have known better than to post it without testing first). This one seems to work:
// CMS Script File
//
// Game Title:
// Written By:
// Date:
//
script
// Initialize interlocks
if (not b255) then
b255 = TRUE;
b1 = FALSE;
b2 = FALSE;
endif
// Start period timer when hat #1 is pushed up
timer(period, d1, 5) = js1.b5 and not b2;
sequence
wait(d1 and js1.b6); // satisfied if hat #1 pushed right before period timer runs
b1 = TRUE; // Interlock
cms.b1 = TRUE; // This is your logical up-and-right output
wait(not js1.b6); // hold until released
cms.b1 = FALSE;
b1 = FALSE;
endsequence
sequence
// generate the "up" output if held long enough
// i.e., we're not generating a logical corner
wait(not d1 and js1.b5 and not b1 and not b2);
cms.b2 = TRUE; // Assign your "up" keystrokes here
wait(not js1.b5);
cms.b2 = FALSE;
endsequence
// Start period timer when hat #1 is pushed right
timer(period, d2, 5) = js1.b6 and not b1;
sequence
wait(d2 and js1.b5); // satisfied if hat #1 pushed up before period timer runs
b2 = TRUE; // Interlock
cms.b1 = TRUE; // This is your logical up-and-right output
wait(not js1.b5); // hold until released
cms.b1 = FALSE;
b2 = FALSE;
endsequence
sequence
// generate the "right" output if held long enough
// i.e., we're not generating a logical corner
wait(not d2 and js1.b6 and not b1 and not b2) ;
cms.b3 = TRUE; // Assign your "right" keystrokes here
wait(not js1.b6);
cms.b3 = FALSE;
endsequence
endScript
I raised the period timer to 5 from 2 to give a little more time to make the consecutive connections. Even though it seems to work, I find it quite cumbersome, and would use it only if I was truly desparate :)
Sorry - JNOV
straffo
22nd May 2004, 02:05 PM
Thank again :) I didn't have yet the time to test it being out of town (and soon about to leave home again :P)
I'll try to test this Sunday if possible.
Powered by vBulletin® Version 4.1.4 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.