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.

Indexed SIMVAR not working

Featured Replies

I am looking to map Avionics 1 and 2 on Milviz Porter. the behavior dialog has no direct SIM Events listed only has 

3 4 (>K:2:ELECTRICAL_BUS_TO_BUS_CONNECTION_TOGGLE)

I copied this rpn to a script and script works - does toggle.

But I want to use the 2-position switch on the Alpha yoke.

Also in Behavior Window, the tooltip TT_VALUE shows 

4·(>A:BUS·LOOKUP·INDEX,·Number)·(A:BUS·CONNECTION·ON:3,·Bool)·if{·'On' } els{ 'Off'}

And the modern tooltip correctly shows on or off.

But when I copy this into script the A:BUS CONNECTION always returns 0.

Does AAO correctly support indexed SIM variables? Is the syntax not the same as SIM?

The is the script for the 'on' switch

4·(>A:BUS·LOOKUP·INDEX,·Number)·(WAIT:500)·(A:BUS·CONNECTION·ON:3,·Bool)·if{·quit·}·els{·1·(>K:Porter-Avionics1_toggle)}
using my script with above.

The debug view on test script always shows 0 after WAIT

I also tried adding 1 == before the if{ 

 

 

  • Commercial Member

Indexed simvars per se work just fine.

The problem here is probably the fact that you have to set a variable first (the lookup index) before you can query the other variable. It is very possible that this only works when it happens in the same script scope. You could try that by sending the entire script to the sim for processing with the "(SIMPROC)" command. But the sim can't call an AAO script, so you have to find a way to work around that.

 

Edited by Lorby_SI

LORBY-SI

  • Author

Would this be the correct syntax? No example in the manual.

(SIMPROC:)·4·(>A:BUS·LOOKUP·INDEX,·Number)·(A:BUS·CONNECTION·ON:3,·Bool)·0·==·if{·3·4·(>K:2:ELECTRICAL_BUS_TO_BUS_CONNECTION_TOGGLE)·}
It always toggles and debug does not change.

  • Author

Never mind - works without the () enclosing

thanks

  • Author

Works correctly with the script editing 'Test' button but not when the script is assigned to a button.

I removed the in-game mappings for this device just to be sure, but not working.

  • Author

Scripts do not run when assigned to the Honeycomb Alpha switch.

But when assigned to a Button-Box switch they work correctly.

 

Maybe something about the context when Alpha switch change is detected?

Archived

This topic is now archived and is closed to further replies.

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.