Krycek Posted July 27, 2009 Report Share Posted July 27, 2009 Sorry if this has been covered before but my searches didn't find anything that answered it. What I'm interested in is if I can assign multiple FSX commands to a single joystick button for it to toggle through using FSUIPC 4.52 registered. I have assigned fuel selector functionality (such as fuel tank left, right, both) to 2 momentary buttons on my CH Throttle Quadrant but it would be neater and better (using a lot less buttons!) for flying twin engine planes if I could assign a toggle between these functions to just 1 button per engine. And while I'm here thank you very much Pete Dowson for FSUIPC which has made my FSX experience of flying multiple GA aircraft with my various joystick axis assignments so easy ! Link to comment Share on other sites More sharing options...
Pete Dowson Posted July 27, 2009 Report Share Posted July 27, 2009 What I'm interested in is if I can assign multiple FSX commands to a single joystick button for it to toggle through using FSUIPC 4.52 registered. Multiple actions on one button? It means adding lines to the INI file -- it cannot be done directly in the Options dialogue. I have assigned fuel selector functionality (such as fuel tank left, right, both) to 2 momentary buttons on my CH Throttle Quadrant but it would be neater and better (using a lot less buttons!) for flying twin engine planes if I could assign a toggle between these functions to just 1 button per engine. Oh, you want a sequence of actions on one button, not several simultaneous actions. Yes, you can do that too, but it also needs INI file editing, and the use of Button Flags. Have a look at the section in the Advanced User's Guide called Sequences, combinations and mixtures. come back after you've read that and thought about it if you have any more questions. I'm not good at giving general tutorials but I can answer specific questions when you've had a think about it. Regards Pete Link to comment Share on other sites More sharing options...
Krycek Posted July 28, 2009 Author Report Share Posted July 28, 2009 Thank you for the pointers. I think I'm on the right track but there maybe a limitation to only having 2 commands ie a toggle to a single button press using the flags, but forgive me if I am wrong as this is the first time I have really gone into the nuts and bolts of FSUIPC. So my thinking so far is I can use a button to set between the commands for say left and right fuel selector but I cannot add any more to this single button for example left, right, center, off fuel selections. At the moment adding 2 commands to a single button does free up button functionality so its all good :) Here is an example of what I have constructed so far - its a rough and ready idea as I'm at work and cant test it (its my lunchbreak!) [buttons] 5=P2,0,C1005,3870 ;Joy2 But0 flag toggle on Joy15 But30 6=CP(F+15,30)2,0 C65957 ;Joy2 But0 Fuel Selector Left Using flag toggle 7=CP(F-15,30)2,0 C65958 ;Joy2 But0 Fuel Selector Right Using flag toggle 8=P2,1,C1005,3871 ;Joy2 But1 flag toggle on Joy 15 But31 9=CP(F+15,31)2,1 C65956 ;Joy2 But1 Fuel Selector All Using flag toggle 10=CP(F-15,31)2,1 C65955 ;Joy2 But1 Fuel Selector Off Using flag toggle Comments for clarity I understand there is a limit for those in the actual .ini and I already have 4 buttons assigned so far hence starting at 5. Many thanks for your input, Nicky. Link to comment Share on other sites More sharing options...
Pete Dowson Posted July 28, 2009 Report Share Posted July 28, 2009 So my thinking so far is I can use a button to set between the commands for say left and right fuel selector but I cannot add any more to this single button for example left, right, center, off fuel selections. You can have as many sequential functions as you like, within reason. It is a matter of having multiple conditions. You missed the line in the Section I pointed you to saying You can have one condition, as shown above, or two, or more (up to 16 in fact), like this: With 16 conditions based on 16 flags you can actually have 65,636 combinations. More than enough, I think! ;-) Here is an example of what I have constructed so far - its a rough and ready idea as I'm at work and cant test it (its my lunchbreak!)5=P2,0,C1005,3870 ;Joy2 But0 flag toggle on Joy15 But30 6=CP(F+15,30)2,0 C65957 ;Joy2 But0 Fuel Selector Left Using flag toggle 7=CP(F-15,30)2,0 C65958 ;Joy2 But0 Fuel Selector Right Using flag toggle 8=P2,1,C1005,3871 ;Joy2 But1 flag toggle on Joy 15 But31 9=CP(F+15,31)2,1 C65956 ;Joy2 But1 Fuel Selector All Using flag toggle 10=CP(F-15,31)2,1 C65955 ;Joy2 But1 Fuel Selector Off Using flag toggle Very good. You could of course combine those by: 5=CP(F+15,30)2,0,C1005,3871 ;Joy2 But0 flag toggle on Joy15 But31 if But30 already set 6=P2,0,C1005,3870 ;Joy2 But0 flag toggle on Joy15 But30 Before I go on, a bit of explanation. I'll call the two button flags 30 and 31. The first time through you get Flag 30 set, 31 still unset. Next time, though, because 30 was set, 31 will be, but 30 is then unset. Next time 31 remains set, and 30 is also set Finally, 31 is unset as is 30. So the cycle is: 30 not 31 -> not 30, but 31 -> 30 and 31 -> not 30 nor 31. Using this: 7=CP(F+15,30)(F-15,31)2,0 C65957 ;Joy2 But0 Fuel Selector Left 8=CP(F-15,30)(F+15,31)2,0 C65958 ;Joy2 But0 Fuel Selector Right 9=CP(F+15,30)(F+15,31)2,0 C65956 ;Joy2 But0 Fuel Selector All 10=CP(F-15,30)(F-15,31)2,0 C65955 ;Joy2 But0 Fuel Selector Off See, you can cycle between 4 choices with two flags (similarly 8 with 3, 16 with 465536 with 16). Regards Pete Link to comment Share on other sites More sharing options...
Krycek Posted July 28, 2009 Author Report Share Posted July 28, 2009 Fantastic ! I didn't quite understand the multiple flags originally, thinking they would all just reset on a button push. Thank you for putting me straight. I will give the suggestions a go tonight. Many thanks for your assistance in this matter and your continued support of your excellent FSUIPC. Regards, Nicky. Link to comment Share on other sites More sharing options...
hartseld Posted May 23, 2014 Report Share Posted May 23, 2014 Fantastic ! I didn't quite understand the multiple flags originally, thinking they would all just reset on a button push. Thank you for putting me straight. I will give the suggestions a go tonight. Many thanks for your assistance in this matter and your continued support of your excellent FSUIPC. Regards, Nicky. Nicky, did you ever get this to function. I am attempting the same using a single button and while I can get a single button to work for selecting right & left, I don't get it to select right, left, all, off using the flag structure Pete provided. I understand the flag states, a simple two variable, binary state truth structure (4 possibilities) but when I use the suggested code, it does not work. Don Link to comment Share on other sites More sharing options...
turbovela Posted September 8, 2014 Report Share Posted September 8, 2014 Ok I'm lost, I need to have to commands cycle back and forth with one single button. The button below is the one setup through FSUIPC on fs9 20=P3,13,Cx0050078EB,x01 That same button (13) I need it to cycle between reading offset 78EB bit 1 when pushed once, then when pushed again to read offset 78EB bit 2, after this I need the button to read bit 1 again if pushed and after that but 2. A cycle between bit 1 and 2 over and over every time the button is pushed. Any ideas? Thank you Jose Link to comment Share on other sites More sharing options...
Pete Dowson Posted September 9, 2014 Report Share Posted September 9, 2014 Ok I'm lost, I need to have to commands cycle back and forth with one single button. The button below is the one setup through FSUIPC on fs9 20=P3,13,Cx0050078EB,x01 That same button (13) I need it to cycle between reading offset 78EB bit 1 when pushed once, then when pushed again to read offset 78EB bit 2, after this I need the button to read bit 1 again if pushed and after that but 2. A cycle between bit 1 and 2 over and over every time the button is pushed. Any ideas? Thank you Jose This appears to be the same question you asked in a separate thread. Please see my answer there. Pete Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now