Jump to content

Help displaying message on cockpit control change


WytchCrypt

Recommended Posts

Hi all :helpsmilie:

 

I've been using triggers to successfully set many cockpit switches and knobs on mission entry. Works great but there's something related I can't seem to get to work. I'd like to display a message when a specific cockpit control is activated/deactivated. For example, let's say I'm flying my Su-33 and want to display a message when I toggle the wingtip smoke. The ID of toggling wingtip smoke for the Su-33 is 78. I've been trying:

 

Trigger, "Switched Condition"

Condition, "X: Cockpit argument in range (78,0,1,"")

Action, "Message to All (smoke is on,10,false,0)

 

I've been trying several variations of this but can't seem to get it to work. Would anyone out there be so kind as to give me an example of how I could achieve this?

 

Thanks!

Alienware Area-51M: i7-9700K, 165Hz 27" ASUS Swift PG279 IPS with G-SYNC, 32GB DDR4 Ram, 1TB M.2 PCie x4 SSD, 1TB SSHD, NVIDIA GeForce RTX 2070 8GB GDDR6, Windows 10, CH Eclipse...

 

Check out my fictional F/A 18-C Hornet and Su33 Flanker skins at: https://www.digitalcombatsimulator.com/en/files/?CREATED_BY=WytchCrypt&set_filter=Y

Link to comment
Share on other sites

You don't say what it's doing, just that it doesn't work, but my guess is that you always have a message "smoke is on" message displayed for ten seconds. I think the problem is related to the range you have set for "X: Cockpit argument in range". You have the minimum value set at 0 and the max set at 1 for a togglable argument. When the argument is false (smoke is off), its value should be 0, and when it's true (smoke is on), its value should be 1. Your trigger is therefore always true whether smoke is actually switched on or not.

 

Try changing your minimum value to some value greater than 0 (example: "0.95") and see if that makes a difference.

Very Respectfully,

Kurt "Yoda" Kalbfleisch

London

"In my private manual I firmly believed the only time there was too much fuel aboard any aircraft was if it was fire." --Ernest K. Gann

 

Link to comment
Share on other sites

What I meant was the display of Message, "smoke is on" isn't displaying no matter what min and max settings I try.

 

Did more research and found a very strange thing. For the FA-18C, the code to trigger the landing gear command is id 68 (found by enabling "options_add_command_to_tooltip" line in MissionEditor.lua and observing command in FA-18C Options->Controls screen). When I begin a mission by triggering an execution of "X: set command ( 68 )" it does in fact lower the gear. But if I try to display a message of, "hey the gear is down" by next checking the condition "X: Cockpit argument in range (68,0,0.95,"")" it doesn't display. I then referenced the Mods/aircraft/FA-18C/Cockpit/Scripts/clickabledata.lua and found it defines a code of 226 for "LDG_Gear_Control_Handle". When I change my condition to ""X: Cockpit argument in range (226,0,0.95,"")" the message displays as expected!

 

That's great for the Hornet, but I'm still stuck on the Su-33. I'm wondering if since it doesn't have a clickable cockpit (and therefore no, "clickabledata.lua") that there's no way to examine the "X: Cockpit argument in range()" condition for any of it's cockpit settings? If I'm wrong, where is the file that defines the cockpit codes for the Su-33? I've looked everywhere examining several *.lua files but none seem to be the correct one. I have a feeling this is in fact the case and that this type of logic won't work for the Su-33 (or anything without a clickable cockpit).

 

At this point, the question is now is there a way to popup a message based on the state of a cockpit control of the Su-33? For example, if I hit "T" to enable smoke, is there a way to popup a message?

Alienware Area-51M: i7-9700K, 165Hz 27" ASUS Swift PG279 IPS with G-SYNC, 32GB DDR4 Ram, 1TB M.2 PCie x4 SSD, 1TB SSHD, NVIDIA GeForce RTX 2070 8GB GDDR6, Windows 10, CH Eclipse...

 

Check out my fictional F/A 18-C Hornet and Su33 Flanker skins at: https://www.digitalcombatsimulator.com/en/files/?CREATED_BY=WytchCrypt&set_filter=Y

Link to comment
Share on other sites

Does X: Set Command (78 ) work to turn the smoke on? If so, you might use X: Start Wait User Response to set a flag that, when true, the X: Set Command (78 ) is performed and a message "smoke on" is displayed.

Very Respectfully,

Kurt "Yoda" Kalbfleisch

London

"In my private manual I firmly believed the only time there was too much fuel aboard any aircraft was if it was fire." --Ernest K. Gann

 

Link to comment
Share on other sites

At this point, the question is now is there a way to popup a message based on the state of a cockpit control of the Su-33? For example, if I hit "T" to enable smoke, is there a way to popup a messeage?

 

the FC3 aircrafts have no cockpit controls as such, only some switches animation, so most likely the cockpit triggers dont work with them, only the "set command" triggers work with FC3.

 

 

 

For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra

For Gaming: 34" Monitor - Ryzen 3600X - 32 GB DDR4 2400 - nVidia GTX1070ti - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar - Oculus Rift CV1

Mobile: iPad Pro 12.9" of 256 GB

Link to comment
Share on other sites

 

the FC3 aircrafts have no cockpit controls as such, only some switches animation, so most likely the cockpit triggers dont work with them, only the "set command" triggers work with FC3.

 

 

Ya, that's the conclusion I came to when I realized the Su-33 had no clickabledata.lua :(

Alienware Area-51M: i7-9700K, 165Hz 27" ASUS Swift PG279 IPS with G-SYNC, 32GB DDR4 Ram, 1TB M.2 PCie x4 SSD, 1TB SSHD, NVIDIA GeForce RTX 2070 8GB GDDR6, Windows 10, CH Eclipse...

 

Check out my fictional F/A 18-C Hornet and Su33 Flanker skins at: https://www.digitalcombatsimulator.com/en/files/?CREATED_BY=WytchCrypt&set_filter=Y

Link to comment
Share on other sites

Does X: Set Command (78 ) work to turn the smoke on? If so, you might use X: Start Wait User Response to set a flag that, when true, the X: Set Command (78 ) is performed and a message "smoke on" is displayed.

 

Yes, the Set Command( 78 ) and other argument ID's work fine with the Su-33! I'm able to toggle on internal and external lights, smoke, flaps, gear, etc...anything that can be triggered with a keyboard as defined in it's Options->Controls screen. I'm not familiar with X: Start Wait User Response...just looked it up and it's close to what I want, but only listens for spacebar or backspace keys.

 

What I really need is a conditional that's purpose is to capture keyboard input & test for what specific key was pressed. Then I can translate that to a "show message" action :smilewink:

Alienware Area-51M: i7-9700K, 165Hz 27" ASUS Swift PG279 IPS with G-SYNC, 32GB DDR4 Ram, 1TB M.2 PCie x4 SSD, 1TB SSHD, NVIDIA GeForce RTX 2070 8GB GDDR6, Windows 10, CH Eclipse...

 

Check out my fictional F/A 18-C Hornet and Su33 Flanker skins at: https://www.digitalcombatsimulator.com/en/files/?CREATED_BY=WytchCrypt&set_filter=Y

Link to comment
Share on other sites

  • Recently Browsing   0 members

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