Jump to content

Recommended Posts

Posted

I searched the forums and couldn't find anything specifically related to the engine coolant gauge.

I am currently working on a mission where I'd like to send a message to the player when the engine coolant temp reaches 50°C.  Can I do this with the regular triggers in the ME, or do I need to dust off my programming skills and do something in a LUA script?  Is it possible at all?

I hoped I could steal logic from ED's engine startup tutorial, but it doesn't cover coolant temps 🤨

If this needs code, any examples would be most appreciated.

Thanks in advance.

System Specs:

  Reveal hidden contents

 

Posted
  On 5/10/2022 at 8:00 PM, Mistermann said:

...I am currently working on a mission where I'd like to send a message to the player when the engine coolant temp reaches 50°C.  Can I do this with the regular triggers in the ME...

Expand  

Yes, I attached a .miz example with P51D and 50°C coolant temp.

The data needed for that are located in mainpanel_init.lua ( \DCS World OpenBeta\Mods\aircraft\P-51D\Cockpit\Scripts ) :

Coolant_Temperature					= CreateGauge()
Coolant_Temperature.arg_number		= 22
Coolant_Temperature.input			= {-80, 150} 
Coolant_Temperature.output			= {0, 1}
Coolant_Temperature.controller		= controllers.Coolant_Temperature

 

test-P51D-Coolant-Temp-Trigg.mizFetching info...

Posted

Thank you!  I will incorporate today.  This community is great!

System Specs:

  Reveal hidden contents

 

Posted
  On 5/11/2022 at 12:03 AM, toutenglisse said:

Yes, I attached a .miz example with P51D and 50°C coolant temp.

The data needed for that are located in mainpanel_init.lua ( \DCS World OpenBeta\Mods\aircraft\P-51D\Cockpit\Scripts ) :

Coolant_Temperature					= CreateGauge()
Coolant_Temperature.arg_number		= 22
Coolant_Temperature.input			= {-80, 150} 
Coolant_Temperature.output			= {0, 1}
Coolant_Temperature.controller		= controllers.Coolant_Temperature

 

test-P51D-Coolant-Temp-Trigg.miz 9.87 kB · 2 downloads

Expand  

Just wondering why in the trigger you set the Min at 0.56?

Posted (edited)
  On 5/11/2022 at 12:56 PM, wraith70 said:

Just wondering why in the trigger you set the Min at 0.56?

Expand  

On the range of needle position, 0.56 corresponds to 50°C on the gauge (found empirically - EDIT : gauge range -80 to 150 = 230, output range 0 to 1 = 1, on gauge range 50°C is 130 (-80 to 50 = 130), 1 x 130 / 230 = 0.5652...). Also, I put trigger Max range to 1 (max needle position), instead of 0.57 or 0.58 for example, because if, for a reason, the needle quickly overpass the wanted range value (0.56 to 0.57 or 0.58), it can be undetected because of the 1 second interval value check.

Edited by toutenglisse
in post
Posted (edited)

This concept is a great unlock for me @toutenglisse.  With the information above you've not only taught me (us) where this information is stored, but also what the input gauge range and outputs mean in this LUA.  Armed with this information, I am a better mission creator.

Thank you, Sir!

 

Edited by Mistermann

System Specs:

  Reveal hidden contents

 

  • Recently Browsing   0 members

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