View Full Version : Help programming dual trigger Frankenforce
inigohe
4th April 2009, 09:31 PM
Hi...
Best regards from Spain, I need someone who can help to me. First the ball, I donīt know anything about cms scripting; then I have one FrankenForce with dual trigger and here is my question, How I program the trigger in order to have only cannons or machinne gun or the twice at the same time.
The problem itīs if I Have the first stage for machine gun and the second one for cannon, I have to expent bullets of the first one, when I need to use only the cannon, and finnally when I need to use machine gun I donīt have enough bullets or is empty, do you understand to me????
I thought It will be imposible, isnīt.
Sorry about my english.
Thx for help me.
inigohe
Bob Church
4th April 2009, 10:38 PM
Hi inigohe,
You could script it. A little logic so that if you get to the second position, the first position would open back up. Put a slight delay on the first position to give you time to get past it. If the first click were js1.b1 and the second were js1.b2, it might look something like this:
script
// First set up a little time delay to hold off the
// guns for a timer click or so you could get passed
// the first click. Lock it out if you got to the second
// click.
//
timer( ONDELAY, d1, 1 ) = js1.b1 AND NOT js1.b2;
// Now send the delayed output out of the timer out
// to the guns.
//
cms.b1 = d1;
endScript
I think that's all it would take. With the lockout on the timer (js1.b1 AND NOT js1.b2) if you come back far enough for cannons quickly, the timers going to shut off before it times out anyway and the guns won't get a signal. The cannons could be tied directly to js1.b2. You'd need to add the CMS Controls to the map and the guns would need to get moved from js1.b1 to cms.b1, but I think that would do it. If you couldn't get through guns quickly enough, put a bigger number in the timer statement to give you a little more time to get through the first click.
The only drawback would be it wouldn't do guns and cannons at the same time. You could rearrange things a little so that maybe if the shift was down, it would enable them both. If the shift button was js1.b3, you'd just need to change the one line that set cms.b1 so it read:
script
// First set up a little time delay to hold off the
// guns for a timer click or so you could get passed
// the first click. Lock it out if you got to the second
// click.
//
timer( ONDELAY, d1, 1 ) = js1.b1 AND NOT js1.b2;
// Now send the delayed output out of the timer out
// to the guns. If js1.b3 is pushed, ignore the timer
// and just fire them off right away.
//
cms.b1 = d1 OR ( js1.b1 AND js1.b3 );
endScript
Does that help?
Best regards,
- Bob
The StickWorks
http://www.stickworks.com
snomhf
6th April 2009, 02:31 AM
Hi...
...
I have one FrankenForce with dual trigger
...
inigohe
Inigohe,
If you have built your frankenforce as I have described (http://snomhf.exofire.net/frankenForce/intro.html), you are only going to be able to program stage 1 using CM. The second stage is Logitech and you'll have to use the Logitech Profiler to set it up. The Logitech Profiler is pretty good (not nearly as powerful as CM) but adequate to do what you're wanting to do sounds like.
Most games provide a "Fire guns only", "Fire cannons only", and "Fire all guns." I assign "Fire guns only" to the first stage (FighterStick B1) and "Fire all guns" to my second stage (Logitech trigger using Logitech Profiler). I use my Side Trigger (B3) for cannons. If you wanted to use machine guns and cannons both in stage 1 of your trigger, you could do that with a "Shift Key" where you would hold down the shift key, pull the trigger and have just the cannons fire.
You don't need any programming for any of this by the way.
Hope that is answering your question.
inigohe
6th April 2009, 08:01 AM
Thx for the answers.
Best regards.
inigohe
GunRunner
7th May 2009, 07:09 PM
inigohe For IL2 Forgotten Battles.
1. This might help you. Hat 1 is used with the thumb! Please bear in mind, I am poor at this programming lark (it is my age), but a very good friend of mine made a script for me for the functions as follows:
a. If the switch is pushed forward hard for a fraction of a second (you need to test for feel), it gives just normal guns (303 or .5 calibre).
b. If it is just tapped back it will give canons and guns.
c. If it is pulled back hard and held for a fraction, it will give just canons.
2. Please dont ask me to go into details on this as I did not write the script.
sequence // ************gun fire*************
if (cms.b65) then
a43=2;
endif
if (cms.b66) then
a43=1;
endif
endsequence
if (js1.b5) then
a43=3;
endif
sequence
while ( JS1.b1 );
if ([a43==1]) then
cms.b23 = true;
endif
if ([a43==2]) then
cms.b25 = true;
endif
if ([a43==3]) then
cms.b24 = true;
endif
endsequence
sequence
IF( NOT JS1.B1 ) THEN // If Button 1 is released then
CMS.b25=false;
endif
IF( NOT JS1.B1 ) THEN
CMS.b23=false;
CMS.b24=false;
ENDIF
endsequence
Remember, this sequence is for gun/canon selection, you will still need to fire the guns using the trigger.
I dont know if this is in conflict with what Bob has posted or not. I have read your initial post request and listed what was written for me.
Powered by vBulletin® Version 4.1.4 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.