Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How to make an increment (++), multiplied by 10

Featured Replies

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. 

  • 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

  • Author

Thanks, I will try that.

I setup a long press with the repeat function that works somewhat ok. 

 

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?

  • Author

Thanks Hadron, gives me something else to try.

Much appreciated

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.