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.

Accessing Component Variables (O:)

Featured Replies

Hi All

I'm trying to get a simple script working with a three position switch.

Currently, I have the following:

(L:F28_OH_EmerLt_Toggle_Switch,·Number)·sp0
0·sp1
l0·0·==·if{
··1·sp0
··1·sp1
}·els{
··l0·1·==·if{
····l1·1·==·if{
······2·sp0
····}·els{
······l1·0·==·if{
········0·sp0
······}
····}
··}·els{
····l0·2·==·if{
······0·sp0
····}
··}
}
l0·(>L:F28_OH_EmerLt_Toggle_Switch,·Number)

I need to access a component variable called 'PreviousPos' so the switch can cycle through 0>1>2>1>0, rather than just 0-1-2-0...

The variable is shown in the DevMode behaviour panel (Under Component Variables, (O:) Vars), but is there any way to access it in a script?

 

Thanks!!

  • Commercial Member

No, accessing O: or I: variables is not possible. And in this case it is IMO also not required.

Take a look at the seq and iseq RPN operators that AAO has. Those will make your life a lot easier with this kind of sequencial triggering (and they aren't limited to just 3 positions either)

0·1·2·1·(L:F28_OH_EmerLt_Toggle_Switch,·Number)·(L:F28_OH_EmerLt_Toggle_Switch_idx)·4·iseq·(>L:F28_OH_EmerLt_Toggle_Switch,·Number)·(>L:F28_OH_EmerLt_Toggle_Switch_idx)

In the AAO manual there is a long list of all available RPN operators and commands with generic examples. The app has many more of those than the default RPN code in MSFS.

(btw: the "L:..._idx" variable is an invented one. You can name it whatever you want, it just has to be unique for every iseq sequence. For convenience sakes I always reuse the name of the variable that is being manipulated )

Edited by Lorby_SI

LORBY-SI

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.