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.

fsx prop axis script

Featured Replies

Heya!

I would like to write a small script to use a button press to increment or decrement the prop axis by a certain amount (the default built in prop incr/decr are not the correct amount for the plane I am flying resulting in multiple presses needed to get the position I want).

So my questions are:

how do i "read" the current prop axis position in the sim and put it into a local variable.... if it was an LVAR i would write something like local prop_position = ipc.readLvar("L:insertLvarnamehere")

1. How do I do the same thing for the fsx value?

2. What is the range of values?

3. I know how to write it back to the sim - would use ipc.control(65767,prop_position+X) (where X is the amount I want to change the value by

 

Thanks in advance!!!

 

Clark

 

  • Author

so i found

prop 1 lever -------- 088E values range from -4096 to +16384

prop 2 lever -------- 0926 values range from -4096 to +16384

So I have this:

function Condition_Lever_2_INCR_TEST ()
    CL_2 = ipc.readUB(0926)
    if CL_2 < (16384) then
    ipc.control(65767,(CL_2+4096))
    else
    end
end

but its not really working... thoughts? Thanks!

  • Author

Update - solved. I just wrote a script that uses the built in prop_incr command and iterated it the correct number of times (which is 30) so my script looks like this:

function Condition_Lever_DECR ()
    ipc.control(65771)
    ipc.control(65771)
    ipc.control(65771)
    ipc.control(65771)
    ipc.control(65771)
    ipc.control(65771)
    ipc.control(65771)
    ipc.control(65771)
    ipc.control(65771)
    ipc.control(65771)
    ipc.control(65771)
    ipc.control(65771)
    ipc.control(65771)
    ipc.control(65771)
    ipc.control(65771)
    ipc.control(65771)
    ipc.control(65771)
    ipc.control(65771)
    ipc.control(65771)
    ipc.control(65771)
    ipc.control(65771)
    ipc.control(65771)
    ipc.control(65771)
    ipc.control(65771)
    ipc.control(65771)
    ipc.control(65771)
    ipc.control(65771)
    ipc.control(65771)
    ipc.control(65771)
    ipc.control(65771)
end


is there any way to tidy this up? Can i tell Linda to execute a command 30 times somehow?

Clark

 

 

Try

Function Condition_Lever_dec()

I = 0

while I < 30 do

ipc.control(65771)

I = I + 1

end

end

Edited by ScotFlieger

Andrew Gransden

Scotland, UK

LINDA Support/Developer - VATSIM and BAVirtual - Airbus Flyer

i7 1TB SSD GTX980 - FSX/P3D - Aerosoft Airbus A318/A319/A320/A321 - FS2Crew

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.