=Andre= Posted September 30, 2015 Share Posted September 30, 2015 Hi guys, having in mind {combos = {{key = "]"}, }, down = 3001, cockpit_device_id = 1, value_down = 1, name = "Kneeboard Next Page", category = "Kneeboard"} from Saved Games\DCS\Config\Input\su-27\keyboard\default.lua I'm trying to performClickableAction at Kneeboard device local dev = GetDevice(1) dev:performClickableAction(3001,1) but getting error attempt to index local 'dev' (a number value) Could you please help me to find the way to perform the action? Gametrix JetSeats thread (in English) , SimShaker addon for bass-shakers thread (in English), Andre's blog, downloads, manuals (in English). [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
FSFIan Posted September 30, 2015 Share Posted September 30, 2015 I don't have the Su-27, but the following works in the Huey (where the kneeboard device has id 45): local dev = GetDevice(45) dev:performClickableAction(3001,1) I have never heard of GetDevice() returning a number. DCS-BIOS | How to export CMSP, RWR, etc. through MonitorSetup.lua Link to comment Share on other sites More sharing options...
=Andre= Posted September 30, 2015 Author Share Posted September 30, 2015 Ian;2490573']I don't have the Su-27, but the following works in the Huey (where the kneeboard device has id 45): local dev = GetDevice(45) dev:performClickableAction(3001,1) I have never heard of GetDevice() returning a number. Thanks Ian, I also get it working in Mig-21 with Device number 61, but get failure with Su-27. It seems GetDevice() returns back a number for non-existent device. Gametrix JetSeats thread (in English) , SimShaker addon for bass-shakers thread (in English), Andre's blog, downloads, manuals (in English). [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
FSFIan Posted September 30, 2015 Share Posted September 30, 2015 I tested again with the Su-25T, which is also a FC3 aircraft. Got the same result you did (GetDevice(1) returns 1). A look at device_init.lua for the Su-25T: mount_vfs_texture_archives("Bazar/Textures/AvionicsCommon") attributes = { "support_for_cws", } --------------------------------------------- dofile(LockOn_Options.common_script_path..[b]"KNEEBOARD/declare_kneeboard_device_left.lua"[/b]) --------------------------------------------- Scripts/Aircrafts/_Common/Cockpit/KNEEBOARD/declare_kneeboard_device_left.lua: is_left = true dofile(LockOn_Options.common_script_path..[b]"KNEEBOARD/declare_kneeboard_device.lua"[/b]) declare_kneeboard_device.lua starts like this: local kneeboard_id = 100 if devices then kneeboard_id = devices.KNEEBOARD or 100 end So for FC3 aircraft (where the devices enumeration is missing), the Kneeboard gets device ID 100. The following works for me in the Su-25T: local dev = GetDevice(100) dev:performClickableAction(3001,1) 1 DCS-BIOS | How to export CMSP, RWR, etc. through MonitorSetup.lua Link to comment Share on other sites More sharing options...
=Andre= Posted September 30, 2015 Author Share Posted September 30, 2015 Great! That works for Su-27 as well :thumbup: Thanks a lot for your explanation, Ian :) Gametrix JetSeats thread (in English) , SimShaker addon for bass-shakers thread (in English), Andre's blog, downloads, manuals (in English). [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
Recommended Posts