Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Hi Pete,

I tried last week some things with the conditional button assigments. Im at work now so I dont remember the exact offsets I was using. Anyway following is what I liked to accomplish :

offset for external view (xxxx)

value 1 = outside view

value 4 = spot plane view

So I put in the fsuipc.ini for the same button press two lines

the first line : when value on offset xxxx is 1 -> change it to 4

the 2nd line : when value on offset xxxx is 4 -> change it to 1

but this did not workwhen it was 4 and I pressed the button it went to 1

when it was 1 and I pressed the button it went to 1

the reason : I think that when it is one fsuipc matches the first line and executed

but then it matches with the new value also the second line and sets it back to 1

Greetz Peter

Posted

Anyway following is what I liked to accomplish :

offset for external view (xxxx)

value 1 = outside view

value 4 = spot plane view

So I put in the fsuipc.ini for the same button press two lines

the first line : when value on offset xxxx is 1 -> change it to 4

the 2nd line : when value on offset xxxx is 4 -> change it to 1

but this did not workwhen it was 4 and I pressed the button it went to 1

when it was 1 and I pressed the button it went to 1

the reason : I think that when it is one fsuipc matches the first line and executed

but then it matches with the new value also the second line and sets it back to 1

Correct.

If you know it is either 4 or 1 you could simply use one line (and even program it in the FSUIPC options dialogue) to "togglebits" with a parameter 5. That'll change 4 to 1 and 1 to 4. (But also 2<->7, 3<->6 and 5<->0, giving 3 unassigned values with unknown consequences.

The other (safer) way, in the INI, is to use the latching Flag facilities. Just use the flag for the same button, which is toggled each time you press the button.

if flag is clear write 1

if flag is set write 4

The own-flag testing method effectively turns an ordinary press-button into a latching toggle, doing alternate actions on each press.

Regards

Pete

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.