DerKlausi Posted May 3, 2023 Posted May 3, 2023 Hi all, the title says it: I'm looking for a single parameter that can be evaluated within export.lua to find out if the player is dead/alive and/or ownship destroyed/functional. Background info: I would like to stop exporting telemetry data to my motion rig upon missile hit, before the plane goes into the violent nose-down spin. Not a fun ride, tbh. Cheers, DK
PravusJSB Posted May 19, 2023 Posted May 19, 2023 I'm not aware of a direct export variable but you could query certain systems to make an educated guess; LoGetMechInfo() -- mechanization info result_is = { gear = {status,value,main = {left = {rod},right = {rod},nose = {rod}}} flaps = {status,value} speedbrakes = {status,value} refuelingboom = {status,value} airintake = {status,value} noseflap = {status,value} parachute = {status,value} wheelbrakes = {status,value} hook = {status,value} wing = {status,value} canopy = {status,value} controlsurfaces = {elevator = {left,right},eleron = {left,right},rudder = {left,right}} -- relative vlues (-1,1) (min /max) (sorry:( } LoGetMCPState() -- (args - 0, results - 1 (table of key(string).value(boolean)) returned table keys for LoGetMCPState(): "LeftEngineFailure" "RightEngineFailure" "HydraulicsFailure" "ACSFailure" "AutopilotFailure" "AutopilotOn" "MasterWarning" "LeftTailPlaneFailure" "RightTailPlaneFailure" "LeftAileronFailure" "RightAileronFailure" "CanopyOpen" "CannonFailure" "StallSignalization" "LeftMainPumpFailure" "RightMainPumpFailure" "LeftWingPumpFailure" "RightWingPumpFailure" "RadarFailure" "EOSFailure" "MLWSFailure" "RWSFailure" "ECMFailure" "GearFailure" "MFDFailure" "HUDFailure" "HelmetFailure" "FuelTankDamage" Creator & Developer of XSAF ::An AI model that wants to kill you, and needs no help from humans. Discord: PravusJSB#9484 twitch.tv/pravusjsb https://www.patreon.com/XSAF https://discord.gg/pC9EBe8vWU https://bmc.link/johnsbeaslu Work with me on Fiverr: https://www.fiverr.com/pravusjsb
DerKlausi Posted May 20, 2023 Author Posted May 20, 2023 11 hours ago, PravusJSB said: I'm not aware of a direct export variable but you could query certain systems to make an educated guess; LoGetMechInfo() -- mechanization info result_is = { gear = {status,value,main = {left = {rod},right = {rod},nose = {rod}}} flaps = {status,value} speedbrakes = {status,value} refuelingboom = {status,value} airintake = {status,value} noseflap = {status,value} parachute = {status,value} wheelbrakes = {status,value} hook = {status,value} wing = {status,value} canopy = {status,value} controlsurfaces = {elevator = {left,right},eleron = {left,right},rudder = {left,right}} -- relative vlues (-1,1) (min /max) (sorry:( } LoGetMCPState() -- (args - 0, results - 1 (table of key(string).value(boolean)) returned table keys for LoGetMCPState(): "LeftEngineFailure" "RightEngineFailure" "HydraulicsFailure" "ACSFailure" "AutopilotFailure" "AutopilotOn" "MasterWarning" "LeftTailPlaneFailure" "RightTailPlaneFailure" "LeftAileronFailure" "RightAileronFailure" "CanopyOpen" "CannonFailure" "StallSignalization" "LeftMainPumpFailure" "RightMainPumpFailure" "LeftWingPumpFailure" "RightWingPumpFailure" "RadarFailure" "EOSFailure" "MLWSFailure" "RWSFailure" "ECMFailure" "GearFailure" "MFDFailure" "HUDFailure" "HelmetFailure" "FuelTankDamage" Thanks a lot - I had already tried querying LoGetMCPState() substates but unfortunately with limited success. In contrast to what I expected to happen after being hit by an AIM120, I found that with the Viper, only LeftAileronFailure and/or RightAileronFailure will ever trigger. Maybe you are able to enlighten me on why that is? Cheers, DK
Recommended Posts