Jump to content

Action at Su-27 Kneeboard device?


=Andre=

Recommended Posts

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

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

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)

  • Like 1
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...