-
Posts
648 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by bones1014
-
Tried making a keybind for putting on the helmet but it doesn't work. Removed and changed it a different combo with no change. *EDIT* The names of the keybinds are swapped. The ones that says put helmet on actually removes it.
-
I added a TACAN command status light option to the TACAN channel export. I made it export 10073. I'll work on one for the Comm Command light too. Should be done here shortly. *EDIT* I guess the UHF hasn't been completed yet so the comm command light will have to wait. function ExportScript.TACAN_channels(mainPanelDevice) -- PILOT local ones = mainPanelDevice:get_argument_value(643) local tens = mainPanelDevice:get_argument_value(644) local hundreds = mainPanelDevice:get_argument_value(645) local mode = mainPanelDevice:get_argument_value(656) > 0.5 and "Y" or "X" local _, tens_decimal = math.modf(tens) if tens_decimal > 0.91 then tens_decimal = 0 end --tacan command indicator local tacan_command if mainPanelDevice:get_argument_value(170) > 0 then tacan_command = "" else tacan_command = "" end ExportScript.Tools.SendData(export_ids.PILOT_TACAN_FREQ_CMD_LGHT, string.format("%.0f%.0f%.0f%s", hundreds * 10, tens_decimal * 10, ones * 10, mode) .. "\n" .. tacan_command) ExportScript.Tools.SendData(export_ids.PILOT_TACAN_FREQUENCY, string.format("%.0f%.0f%.0f%s", hundreds * 10, tens_decimal * 10, ones * 10, mode)) -- WSO local ones = mainPanelDevice:get_argument_value(650) local tens = mainPanelDevice:get_argument_value(651) local hundreds = mainPanelDevice:get_argument_value(652) local mode = mainPanelDevice:get_argument_value(660) > 0.5 and "Y" or "X" local _, tens_decimal = math.modf(tens) if tens_decimal > 0.91 then tens_decimal = 0 end ExportScript.Tools.SendData(export_ids.WSO_TACAN_FREQUENCY, string.format("%.0f%.0f%.0f%s", hundreds * 10, tens_decimal * 10, ones * 10, mode)) end nullnull
-
Just added a pilot's fuel readout. I updated my GitHub repository @Bailey function ExportScript.Pilot_Fuel_Readout(mainPanelDevice) local tens = string.format("%d", mainPanelDevice:get_argument_value(719) * 10) local hundreds = string.format("%d", mainPanelDevice:get_argument_value(720) * 10) local thousands = string.format("%d", mainPanelDevice:get_argument_value(721) * 10) local tensofthousands = string.format("%d", mainPanelDevice:get_argument_value(722) * 10) ExportScript.Tools.SendData(export_ids.PILOT_FUEL_READOUT, string.format("FUEL\n" .. tensofthousands .. thousands .. hundreds .. tens .. "\nx10")) end
-
function ExportScript.HSI(mainPanelDevice) -- Pilot HSI Course Roller local pilotCourseSet_ones = string.format("%d", mainPanelDevice:get_argument_value(674) * 10) local pilotCourseSet_tens = string.format("%d", mainPanelDevice:get_argument_value(675) * 10) local pilotCourseSet_hundreds = string.format("%d", mainPanelDevice:get_argument_value(676) * 10) local bearing_value = mainPanelDevice:get_argument_value(670) * 360 --bearmat local formatted_bearing = string.format("%.0f", bearing_value) --bearmat ExportScript.Tools.SendData(export_ids.PILOT_HSI_COURSE_WINDOW, string.format("HSI\n" .. pilotCourseSet_hundreds .. pilotCourseSet_tens .. pilotCourseSet_ones .. "\nCRS\n" .. formatted_bearing)) --[[ExportScript.Tools.SendData(export_ids.PILOT_HSI_COURSE_WINDOW, string.format(pilotCourseSet_hundreds .. pilotCourseSet_tens .. pilotCourseSet_ones))]] @Bailey @Bearmat the course needle defaults to your current heading when you're in NAV COMP mode and is user set in TAC and VOR/ILS mode. With the combined tile it would be a breeze to match your current course with what is either automatically or manually set with the course set knob. I'm going to combine them if you don't mind. null
-
@Bearmat could we combine your new 10064 HSI bearing pointer with the 10045 pilot course window into one tile? Is there a way to do without running both calculations twice? Only way I can think of is to put your new one inside the previous. I tried to call the exports together but that doesn't work.
-
I created a missile status tile. Uses export 10062. Red for sidewinders and green for sparrows. file I added contains all of @Bailey's content plus what I've added. function ExportScript.Missile_Lights(mainPanelDevice) local heat_left, heat_ml, heat_mr, heat_right, radar_tl, radar_tr, radar_bl, radar_br if mainPanelDevice:get_argument_value(284) < 0.8 then heat_left = "" else heat_left ="" end if mainPanelDevice:get_argument_value(285) < 0.8 then heat_ml = "" else heat_ml = "" end if mainPanelDevice:get_argument_value(286) < 0.8 then heat_mr = "" else heat_mr = "" end if mainPanelDevice:get_argument_value(287) < 0.8 then heat_right = "" else heat_right = "" end if mainPanelDevice:get_argument_value(288) < 0.8 then radar_tl = "" else radar_tl = "" end if mainPanelDevice:get_argument_value(289) < 0.8 then radar_bl = "" else radar_bl = "" end if mainPanelDevice:get_argument_value(290) < 0.8 then radar_tr = "" else radar_tr = "" end if mainPanelDevice:get_argument_value(291) < 0.8 then radar_br = "" else radar_br = "" end local missile_lights = "MSSL STAT" .. "\n" .. "" .. radar_tl .. " " .. radar_tr .. "\n" .. heat_left .. heat_ml .. " " .. heat_mr .. heat_right .. "\n" .. "" .. radar_bl .. " " .. radar_br ExportScript.Tools.SendData(export_ids.MISSILE_LIGHTS, missile_lights) end F-4E-45MC.lua
-
Works fine for me because I don't use the pilot bodies. They just get in the way.
-
you can set your default camera height. press numpad 5, then use right cntrl+shift 9 or 6 to set raise and lower the camera. Once you have the height you want press right alt+numpad 0 to save it.
-
trying to work on the pilot's altimeter. here's what I have so far. It's not working quite right yet. I'm getting extra digits when the needle gets close to rolling over at each thousand feet. **EDIT got it working a little better. right now it rolls the 1000's to the next number too quickly at the top. **EDIT #2 I think I got it working correctly. Please test it. I'll push it up through github. if anyone knows how to add a thousands separator please do. function ExportScript.Pilot_Altimeter(mainPanelDevice) local altitudeWindowReadout_value1 = string.format("%.f",mainPanelDevice:get_argument_value(92) * 10) --hundreds local altitudeWindowReadout_value2 = string.format("%.f",math.floor(mainPanelDevice:get_argument_value(93) * 10)) --thousands local altitudeWindowReadout_value3 = string.format("%.f",mainPanelDevice:get_argument_value(94) * 10) --tenthousands local altitudeWindowReadout_needle = string.format("%.f",mainPanelDevice:get_argument_value(91) * 1000) --needle --this fixes the extra "10" problem if mainPanelDevice:get_argument_value(92) * 10 < 10 then--altitudeWindowReadout_value1 == "10" then altitudeWindowReadout_value1 = "0" end if altitudeWindowReadout_value2 == "10" then altitudeWindowReadout_value2 = "0" end if altitudeWindowReadout_value3 == "10" then altitudeWindowReadout_value3 = "0" end if altitudeWindowReadout_needle == "10" then altitudeWindowReadout_needle = "0" end --this is for the hash part if altitudeWindowReadout_value1 == "0" then altitudeWindowReadout_value1 = "" end -- this is to fill the blank space when the needle is below 100 if #altitudeWindowReadout_needle == 1 then altitudeWindowReadout_needle = string.format("00" .. altitudeWindowReadout_needle) end if #altitudeWindowReadout_needle == 2 then altitudeWindowReadout_needle = string.format("0" .. altitudeWindowReadout_needle) end --[[ExportScript.Tools.SendData(44261, altitudeWindowReadout_value1 .. " ft") --test values ExportScript.Tools.SendData(44262, altitudeWindowReadout_value2 .. " ft") --test values ExportScript.Tools.SendData(44263, altitudeWindowReadout_value3 .. " ft") --test values ExportScript.Tools.SendData(44264, altitudeWindowReadout_needle .. " ft") --test values ExportScript.Tools.SendData(44265, string.format("%.f",mainPanelDevice:get_argument_value(92) * 10) .. " ft") --test values ExportScript.Tools.SendData(44266, string.format("%2.d",mainPanelDevice:get_argument_value(93) * 10) .. " ft") --test values ExportScript.Tools.SendData(44267, string.format("%.f",mainPanelDevice:get_argument_value(94) * 10) .. " ft") --test values ExportScript.Tools.SendData(44268, string.format("%.f",mainPanelDevice:get_argument_value(91) * 1000) .. " ft") --test values]] --value 3 isnt needed bc it is taken over by the needle local altitudeWindowReadout_total = string.format(altitudeWindowReadout_value3 .. altitudeWindowReadout_value2 .. altitudeWindowReadout_value1 .. altitudeWindowReadout_needle) --remove leading zeros altitudeWindowReadout_total = altitudeWindowReadout_total:match("0*(%d+)") --https://stackoverflow.com/questions/34331633/remove-leading-zeroes-in-lua-string local altMsl_f4e_ft = altitudeWindowReadout_total .. "\nFT" ExportScript.Tools.SendData(export_ids.PILOT_ALTIMETER, altMsl_f4e_ft) --[[ExportScript.Tools.SendData(export_ids.PILOT_needle, altitudeWindowReadout_needle) --test ExportScript.Tools.SendData(export_ids.PILOT_hundreds, altitudeWindowReadout_value1) --test ExportScript.Tools.SendData(export_ids.PILOT_thousands, altitudeWindowReadout_value2) --test ExportScript.Tools.SendData(export_ids.PILOT_tenthousands, altitude
-
I just sent up a change to add the pilot's landing gear indicators function ExportScript.Pilot_Gear_Status(mainPanelDevice) local left, nose, right if mainPanelDevice:get_argument_value(52) < 0.5 then left = "" elseif mainPanelDevice:get_argument_value(52) > 0.1 and mainPanelDevice:get_argument_value(52) < 0.9 then left = "" else left = "" end if mainPanelDevice:get_argument_value(51) < 0.5 then nose = "" elseif mainPanelDevice:get_argument_value(51) > 0.1 and mainPanelDevice:get_argument_value(51) < 0.9 then nose = "" else nose = "" end if mainPanelDevice:get_argument_value(50) < 0.5 then right = "" elseif mainPanelDevice:get_argument_value(50) > 0.1 and mainPanelDevice:get_argument_value(50) < 0.9 then right = "" else right = "" end local All_Gear = "LND GEAR\n" .. nose .. "\n" .. left .. " " .. right ExportScript.Tools.SendData(export_ids.PILOT_GEAR_IND, All_Gear) end