-
Posts
581 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by Scarecrow
-
Thank you for the reply Gadroc:) It was actually an issue of case sensitivity in that Mainpanel is defined but MainPanel is called. Issue is solved now thanks:)
-
G940 Leds - working program :)
Scarecrow replied to morg's topic in PC Hardware and Related Software
It worked! You've made my day:D I could kiss you. I have no idea what any of the above means, I'm just a monkey of moderate intelligence who wishes to ape your example. I understand "if then and else" logic and that is about the limit of my programming knowledge. This drove me totally nuts all yesterday:doh: -
Hoping one of you fine folks has some experience with the Ka50 export as it seems to differ from the newer aircraft. I have a G940 which has a 3 colour LED under the throttle buttons. There is a program available for the G940 to recieve export data from DCS world. This works fine for the Huey but I can't get data out of the Ka50. Below is my export.lua . Any help on how to get comparable data out of the Shark would be very appreciated. function ProcessHueyGameLogic(t) local MainPanel = GetDevice(0) if MainPanel ~= 0 then -- Uncomment if you want the leds to update while outside of the cockpit -- MainPanel:update_arguments() -- Gather switch / lamp data local gov_emerg = MainPanel:get_argument_value(100) -- Lamp 0 or 1 local wpn_armed = MainPanel:get_argument_value(254) -- Lamp 0 or 0.9 local wpn_safe = MainPanel:get_argument_value(255) -- Lamp 0 or 0.9 local wpn_selector = MainPanel:get_argument_value(256) -- Switch -1 or 0 local master_caution = MainPanel:get_argument_value(277) -- Lamp 0 or 1 local flare_armed = MainPanel:get_argument_value(458) -- Lamp 0 or 1 local anti_coll = MainPanel:get_argument_value(225) -- Lamp 0 or 1 local nav_lights = MainPanel:get_argument_value(223) -- Switch -1 or 0 or 0.9 ? local flare_disp = MainPanel:get_argument_value(464) -- Lamp 0 or 1 -- First, reset all to OFF SetAllLed(OFF) -- Now apply data to Leds SetLedC(1, GREEN, wpn_safe > 0.5) SetLedC(1, RED, wpn_armed > 0.5) SetLedC(5, AMBER, gov_emerg > 0.5) SetLedC(5, GREEN, gov_emerg < 0.5) -- Flare Logic if flare_armed > 0.5 then if flare_disp >0.5 then SetLed(3, RED) else SetLed(3, GREEN) end end -- Some blink logic for master caution if master_caution > 0.5 then local int, fract = math.modf(t) if fract >= 0.5 then SetLed(6, AMBER) end else SetLed(6, GREEN) end -- Navigation Light Switch Logic if nav_lights < 0.0 then SetLed(8, AMBER) else if nav_lights > 0.5 then SetLed(8, RED) else SetLed(8, GREEN) end end -- Anticollion Switch Logic if anti_coll < 0.5 then SetLed(4, GREEN) else local int, fract = math.modf(t) if fract >= 0.5 then SetLed(4, RED) end end -- Special handling for 7.62mm and rocket selector: -- We only light buttons, if wpn_armed is set if wpn_armed > 0.5 then if wpn_selector >= 0 then SetLed(2, AMBER) else SetLed(2, GREEN) end end end end This is function that handles the Huey data, it works fine. The KA50 does not work, I've checked clickabledata.lua and 330 for bankhold is correct but there is no value coming out:cry: function ProcessSharkGameLogic(t) local Mainpanel = GetDevice(0) if MainPanel ~= 0 then -- Lit button returns 0.1 when active. 0.2 when depressed but not active. 0.3 when depressed and active -- Indicators returns between 0.0 to 1.0, mostly only 0.0 and 1.0 but for example gear_handle moves between them -- Indicators with continous values are marked as such) -- Auto-pilot buttons and switches local bankhold = MainPanel:get_argument_value(330) -- Lit button -- First, reset all to OFF SetAllLed(OFF) -- Now apply data to Leds SetLedC(4, GREEN, bankhold > 0.0) end end I've attached the whole thing at the bottom just in case:) Export.lua
-
G940 Leds - working program :)
Scarecrow replied to morg's topic in PC Hardware and Related Software
Thank you for having a look at it for me Flagrum. :thumbup: If anyone else knows I'd be in your debt.:) -
G940 Leds - working program :)
Scarecrow replied to morg's topic in PC Hardware and Related Software
Hi there was wondering if anyone could give me some pointers in my export.lua. I'm just trying to get an indicator working for nose gear on the Ka50 to begin with. -- Check for Ka50 if acftName == "Ka-50" then ProcessSharkGameLogic(t) needLedUpdate = true end function ProcessSharkGameLogic(t) local Mainpanel = GetDevice(0) if MainPanel ~= 0 then -- Lit button returns 0.1 when active. 0.2 when depressed but not active. 0.3 when depressed and active -- Indicators returns between 0.0 to 1.0, mostly only 0.0 and 1.0 but for example gear_handle moves between them -- Indicators with continous values are marked as such) -- Auto-pilot buttons and switches local bankhold = MainPanel:get_argument_value(330) -- Lit button -- First, reset all to OFF SetAllLed(OFF) -- Now apply data to Leds SetLedC(4, GREEN, bankhold > 0.0) end end Any help would be much appreciated.:) -
Predestination. The thinking mans Timecop
-
G940 Leds - working program :)
Scarecrow replied to morg's topic in PC Hardware and Related Software
First thank you so much to all for knowing this stuff. This is so cool, I've been using this program for years. First for FC2 then BS2 but finally I can use it for everything. After I try to remember how all this works again:book: -
a problem about G27 with DCSW
Scarecrow replied to conon's topic in Controller Profiles and Problems
Make sure you have Force Feedback switched off in the DCS options - misc tab. Maybe the sim thinks you're using a FFB stick.:) -
Panel Key command changes in Lua?
Scarecrow replied to Zeke's topic in PC Hardware and Related Software
This thread will explain the changes that occured with v1.28. Start on page 9 http://forums.eagle.ru/showthread.php?t=122479 That should answer your question and how to make new profiles with diff.lua Or you can use the old profiles by renaming them and overwriting the default ones in the DCS folder:) -
Huey turned out to be the dark horse of all the modules for me. I never had the rotory bug, never bought BS1 just stuck to FC2. I bought the Huey on sale as a stepping stone to learning the Shark. The Huey is just so much fun to fly, I don't even need to shoot stuff. The Ka50 and the Mi8 don't have the same "fun factor". They're great aircraft/modules with more complex avionics but I have way more fun with the huey.
-
Thanks for update. I would be happy to pay for well made SP campaigns. I do hope that regular DCS world updates won't nerf my paid for campaigns after a few months though.
-
Hello, back again, I've got a problem with this mod and the Mig21bis module. When I use the tool to mod my data.lua the throttle axis in the Mig21 ends up bugged. I go into the options GUI and setup the Mig21 thrust axis to the Z axis on my WH throttle and clear all the other devices for that axis but then when I enter the game all my devices have their Z axis bound to thrust. In game I can clear the axes that are incorrectly assigned and that stays until I restart the mission. When I repair DCS assigning thrust in the Mig21 works as expected and after I mod data.lua it goes bugged again. Any help would be appreciated:)
-
DCS detecting all Thrustmaster Warthog HOTAS switch commands!
Scarecrow replied to Archer7's topic in DCS Wishlist
+1 Plz -
That did the trick. Can't rep you enough. I remember the heartache of 1.28 and having to crawl back to Target for a week or two but you ended that sir :thumbup:
-
Hello Karls thank you very much for your work in this area. I've downloaded the DCS modding tool you made but it keeps crashing for me on win7. Also what does it do? Does it alter my Data.lua to allow for up/down events. Any help would be much appreciated :)
-
Click on the drop down that says "all" in the pic. Select axis from that list, now a list of all the controls that can be mapped to an axis will be displayed. The rest should be a cake walk. :) Yeah no click pit this christmas
-
I had a feeling the title would be tounge in cheek. I been playing since before Hot Mountains got renamed. Can't wait to finally see the first true "Next Gen Flightsim"
-
Could be the electric motors cutting out due to overheating?
-
Haven't been playing any DCS the last 3 months but I had to open my wallet for this title. I hope you guys get filthy rich :D
-
Amen to that. The Mavs are useless unless the target is sitting in the middle of a field.:doh:
-
There hysteria should give you some confidence in seeing a return on your investment ;)
-
How to effectively use countermeasures?
Scarecrow replied to Qosmius's topic in DCS World 1.x (read only)
This tutorial whilst tailored to the A10c CMS is relevant to any aircraft.:) http://forums.eagle.ru/showthread.php?t=125061 -
Voted yes, the aircraft are fun to learn but without an immersive, period backdrop the interest soon wains.:)