May 5, 20251 yr Hello, I am trying to increment the JustFlight RJ altitude knob by 1000 feet with each click of my altitude button. In the plane, each click of the actual MCP altitude knob increments the altitude by 100. I am able to do 100 feet with the increment command "(L:MCP_Alt_sel_knob,·Number)·++·(>L:MCP_Alt_sel_knob,·Number)" but can't figure out how to do 1000' Any help would be greatly appreciated.
May 5, 20251 yr Commercial Member 2 minutes ago, lancealotg said: Hello, I am trying to increment the JustFlight RJ altitude knob by 1000 feet with each click of my altitude button. In the plane, each click of the actual MCP altitude knob increments the altitude by 100. I am able to do 100 feet with the increment command "(L:MCP_Alt_sel_knob,·Number)·++·(>L:MCP_Alt_sel_knob,·Number)" but can't figure out how to do 1000' Any help would be greatly appreciated. When the aircraft logic doesn't support 1000 feet increments, there is not a lot that you can do in this case. The problem is the LVar - you can't just call the same script 10 times, that won't work. An LVar is not an event, and if the aircraft logic "gets" the change or not depends on how often it is looking for it. Know what I mean? With an LVar, "something" in the aircraft code must check the variable every x milliseconds if it was changed, and then react accordingly. If you change the value faster than this process is looking for it, you will circumvent it, and clicks will go missing. I don't have that aircraft, but I have the JF 146. Is that the same developer, is there a chance that the logic is similar in both? Also, I would just try dumb things, like (L:MCP_Alt_sel_knob,·Number)·10·+·(>L:MCP_Alt_sel_knob,·Number) (increment the LVar by 10...) LORBY-SI
May 7, 20251 yr Author Thanks, I will try that. I setup a long press with the repeat function that works somewhat ok.
May 7, 20251 yr An example of the plane "expecting" it, the FlySimWare Lear 35A has a 100 and 1000 mode on the altimeter. So I press on one of my encoders to toggle the state using the event the plane expects and run this script for decrease (increase has a + in it instead with 99900 min) when I rotate it. I just nabbed the code from the update code in the behaviors console thing. (L:ALERTER_DIAL_DIGITAL_CUSTOM_L_sec,·Number)·0·==·· if{(L:ALERTER_DIGITAL,·Number)·100·-·0·max·(>L:ALERTER_DIGITAL,·Number)} (L:ALERTER_DIAL_DIGITAL_CUSTOM_L_sec,·Number)· if{(L:ALERTER_DIGITAL,·Number)·1000·-·0·max·(>L:ALERTER_DIGITAL,·Number)} I have also had luck with using a local variable that keeps track of a 100/1000 state that toggles when I press a button, then I just use the _Inc option on a Bvar. So rather than trying to spin the knob 10 times, maybe find the variable the knob is changing and change it directly?
Create an account or sign in to comment