Jump to content

Knob turning sound?


Sabre10

Recommended Posts

How to add the sound of the knob turning?

For example, below is an extract of my AXE lua for turning ND knob on the EFIS:

-- NDMode Knob
function incdecNDMode ( pDiff ) -- increment or decrement NDMode by pDiff
local lNDMode = ipc.readLvar( "L:AB_MPL_ND_Mode" ) + pDiff
if lNDMode > 4 then
  lNDMode = lNDMode - 1
end
if lNDMode < 0 then
  lNDMode = lNDMode + 1
end
ipc.writeLvar( "L:AB_MPL_ND_Mode", lNDMode )
end
function incNDMode ( joynum, button, downup )
incdecNDMode ( 1 )
end
function decNDMode ( joynum, button, downup )
incdecNDMode ( -1 )
end

event.button(174, 18, 1, "incNDMode")
event.button(174, 19, 1, "incNDMode")
event.button(174, 17, 1, "decNDMode")
event.button(174, 16, 1, "decNDMode")
 

The above knob turns ok, but does not tick. The same with all other knobs. All buttons sound OK though. What needs to be added to the script to hear the ticking?

Thanks,

Sabre10.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy & Terms of Use