Jump to content

Coolant Temp. (P-51D)


Mistermann

Recommended Posts

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:

Spoiler

 💻Processor:13th Gen Intel(R) Core(TM) i9-13900K - 🧠RAM: 64GB - 🎥Video Card: NVIDIA RTX 4090 - 🥽 Display: Pimax 8kx VR Headset - 🕹️Accessories:  VKB Gunfighter III MCG Ultimate, Thrustmaster TWCS (modified), Thrustmaster TPR Pedals, Simshaker JetPad, Predator HOTAS Mounts, 3D Printed Flight Button Box 

Thrustmaster TWCS Mod

 

Link to comment
Share on other sites

3 hours ago, 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...

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

Link to comment
Share on other sites

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

System Specs:

Spoiler

 💻Processor:13th Gen Intel(R) Core(TM) i9-13900K - 🧠RAM: 64GB - 🎥Video Card: NVIDIA RTX 4090 - 🥽 Display: Pimax 8kx VR Headset - 🕹️Accessories:  VKB Gunfighter III MCG Ultimate, Thrustmaster TWCS (modified), Thrustmaster TPR Pedals, Simshaker JetPad, Predator HOTAS Mounts, 3D Printed Flight Button Box 

Thrustmaster TWCS Mod

 

Link to comment
Share on other sites

12 hours ago, 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

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

Link to comment
Share on other sites

47 minutes ago, wraith70 said:

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

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
Link to comment
Share on other sites

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:

Spoiler

 💻Processor:13th Gen Intel(R) Core(TM) i9-13900K - 🧠RAM: 64GB - 🎥Video Card: NVIDIA RTX 4090 - 🥽 Display: Pimax 8kx VR Headset - 🕹️Accessories:  VKB Gunfighter III MCG Ultimate, Thrustmaster TWCS (modified), Thrustmaster TPR Pedals, Simshaker JetPad, Predator HOTAS Mounts, 3D Printed Flight Button Box 

Thrustmaster TWCS Mod

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

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