Jump to content

CLICKABLE PAK FA COCKPIT ADVICE ANYONE?


Recommended Posts

i am ready for the next step into starting the Clickable cockpit, i have already added the needed LUA to be able to start this new journey they include

 

 

Clickabledata LUA.

 

MainPanel_Init LUA.

 

Devices LUA.

 

Device_Init LUA.

 

I am also aware that i will need to make a dummy and make the shape of the lever il be making clickable , my first attempt is the Gear lever so i have made a long dummy box with the name of PTN_83

 

and this is the code in clickable data.

elements["PTN_83"] =default_animated_lever(_("Landing Gear Lever"), devices.INSTPANEL, device_commands.Button_83, 83,5.0)

 

Anything else i would be aware off guys those that have been on this road b4 ??

Just to add a gear handle lever dummy connector what would be the steps to take ?

and do i need to add something else in the Entry LUA as well here is mines..

make_flyable('T-50', 'Mods/aircrafts/Flaming Cliffs/Cockpit/Scripts/KneeboardRight/', {'T-50', nil, old = 3}, current_mod_path..'/comm.lua')

plugin_done()

 

 

 

As for 3x max i go into helpers then dummy i hope this is the correct way to add the connector for the gear lever.

 

i am almost done adding the new LUA commands so i can model the clickable parts i am so exited.


Edited by cubanace
Link to comment
Share on other sites

  • 2 weeks later...

MainMenulogo.png.6e3b585a30c5c1ba684bc2d91f3e37f0.png

 

ACER Predator Orion 9000: W10H | Intel i9-7900X OC@4.5Ghz | 8x16GB Crucial Ballistix Sport | Sapphire GTX1080TI | Intel 900P 480GB | Intel 600P 256GB | HP EX950 1TB | Seagate Firecuda 2TB

ACER Predator XB281HK: 28" TN G-SYNC 4K@60hz

ThrustMaster Warthog Hotas, TPR, MFD Cougar Pack, HP Reverb Pro

Link to comment
Share on other sites

 

thank you,i already seen those posts,No i have had no luck, i got the codes for the landing gear lever but like i said i am missing the main LUA called AVIONICS,some codes go into the AVIONICS LUA,but i havent had luck finding one or how to make it from scratch.

 

These are my LUAs at this moment for clickable cockpit and other sistems.

 

Adi lua

Clickabledata lua

clock lua

command_defs lua

device_init lua

devices lua

mainpanel_init lua

weapon_sistem lua

 

you will notice that i am missing AVIONICS LUA.

 

Thank you for at least trying to help man! ..

Link to comment
Share on other sites

I know nothing about it Cuban, but can you use the LUA from the SU-27 or do you need a new one for the T-50?

 

I swear I read somewhere that some one was trying to edit the SU-27 LUA to make it a click pit..but I can't find it now.


Edited by 20thBG_Blackwolf
Added to the post

BSD Discord , BSD Website

If it doesn't hover, it just sucks and blows

Banner EDForum2020.jpg

 

Link to comment
Share on other sites

do you have an "open version", (even if its not working) of you code so people can take a look? or your whole project so one can just slam it into the mods folder

'controlling' the Ka50 feels like a discussion with the Autopilot and trim system about the flight direction.

Link to comment
Share on other sites

do you have an "open version", (even if its not working) of you code so people can take a look? or your whole project so one can just slam it into the mods folder

 

 

I am pretty sure my latest version of the pak fa project already has all the LUA for the cockpit go have a look into the cockpit folder, and see that i am missing the avionics LUA,cant find the dam thing anywhere so i can code it,.

Link to comment
Share on other sites

I know nothing about it Cuban, but can you use the LUA from the SU-27 or do you need a new one for the T-50?

 

I swear I read somewhere that some one was trying to edit the SU-27 LUA to make it a click pit..but I can't find it now.

 

 

I wish i could find the one from the su-27 that way i could make one from scratch get an idea how it works,but i cant find where the avionics lua is at.

Link to comment
Share on other sites

The minimum for an avLuaDevice handler is something like this:

 

local dev = GetSelf()  -- gives you a handle for calling built-in handler functions

make_default_activity(0.1)  -- tells the engine to execute update() every 0.1 seconds

dev:listen_command(XYZ)   -- replace XYZ with your key / clickable device ID

function post_initialize()    -- called after initial setup, allows you to change default state based on starting conditions
end

function SetCommand(command,value)    -- handles all input
end

function update()         -- called at the default activity interval above, to update animations
end

need_to_be_closed = false

 

You'll need to populate the 3 main function bodies above with your own avionics logic (or whatever else you're working on).

 

This handler is bound from device_init.lua with a line similar to:

 

creators[devices.AVIONICS] = {"avLuaDevice", LockOn_Options.script_path.."Systems/avionics.lua"}

 

Where devices.AVIONICS was created in devices.lua with something like:

 

devices["AVIONICS"] = counter()

 

In the above, counter() is just a local function to increment and return the next integer.

 

--gos


Edited by gospadin
Link to comment
Share on other sites

The minimum for an avLuaDevice handler is something like this:

 

local dev = GetSelf()  -- gives you a handle for calling built-in handler functions

make_default_activity(0.1)  -- tells the engine to execute update() every 0.1 seconds

dev:listen_command(XYZ)   -- replace XYZ with your key / clickable device ID

function post_initialize()    -- called after initial setup, allows you to change default state based on starting conditions
end

function SetCommand(command,value)    -- handles all input
end

function update()         -- called at the default activity interval above, to update animations
end

need_to_be_closed = false

 

You'll need to populate the 3 main function bodies above with your own avionics logic (or whatever else you're working on).

 

This handler is bound from device_init.lua with a line similar to:

 

creators[devices.AVIONICS] = {"avLuaDevice", LockOn_Options.script_path.."Systems/avionics.lua"}

 

Where devices.AVIONICS was created in devices.lua with something like:

 

devices["AVIONICS"] = counter()

 

In the above, counter() is just a local function to increment and return the next integer.

 

--gos

Thank you Gospadin.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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