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.

Issue with 'One Shot' Automated Script Function

Featured Replies

Hello,

I made a small script for a 50ft AGL one-time call-out when landing* and set it up as an 'One Shot' Aircraft Automated Script with 400ms delay**.

If set like that it seems to me that it never triggers though***. If set as 'Repeating' or when testing in the RPN editor it works correctly. I tried restarting the flight or even the sim after each attempt. 

I don't have a clue what I am doing wrong here or maybe what the One Shot function does exactly. I would welcome any help.

*Script Code: (A:FLAPS·HANDLE·INDEX,·Number)·4·>=·(A:PLANE·ALT·ABOVE·GROUND,·Feet)·55·<·and·if{·(VOICE:Microsoft·David·Desktop)·(SPEAK:50)·}

** I tried with various delay times to no avail.

***Actually, there are two instances when the script triggers even when set as One-Shot but not as intended. It happens when I hit Esc to pause the sim or 2) when opening or closing the Automated Script menu in AAO.

I am using ver 2.28 b18.

Kind regards

Edited by Ohmsquare
Correction

CPU Ryzen 5800X3D RAM 64GB DDR4 3200MHz GPU RTX 5070 Ti (16 GB VRAM) Display 38" LG OS Windows 11
 

  • Commercial Member
1 hour ago, Ohmsquare said:

what the One Shot function does exactly.

The "One shot" does what it says: it executes the code exactly once, whenever the plane configuration is reloaded in AAO - that's it. It doesn't wait for any condition to happen, it just runs through the script once and is done. This is intended to be used for initializing variables at the start of a flight. Or starting scripts like you did, you just need the correct syntax:

If you want to wait for something to happen, there are several options (like I said, still OneShot scripts, but waiting for your condition to be met). Check the chapter "AAO specific script headers" in the manual. It is at the end of those long lists with all the RPN operators.

(LISTEN_FOR_RPN:(A:FLAPS·HANDLE·INDEX,·Number)·4·>=·(A:PLANE·ALT·ABOVE·GROUND,·Feet)·55·<·and)·if{·(VOICE:Microsoft·David·Desktop)·(SPEAK:50)·}
or
[(A:FLAPS·HANDLE·INDEX,·Number)·4·>=·(A:PLANE·ALT·ABOVE·GROUND,·Feet)·55·<·and]·(VOICE:Microsoft·David·Desktop)·(SPEAK:50)

both do the same thing.

If the use cases become more complex, use a script file with conditional elements, like a CONVERSATION. I have a tester who has modelled the complete flight with actions and audio snippets, including  checklists, pushback, flight attendant, landing or go around with a CONVERSATION.

Edited by Lorby_SI

LORBY-SI

  • Author

And now it works great, thank you very much for your support.

The possibilities with AAO are endless, such a great program.

 

CPU Ryzen 5800X3D RAM 64GB DDR4 3200MHz GPU RTX 5070 Ti (16 GB VRAM) Display 38" LG OS Windows 11
 

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.