Jump to content

Dynamic Cockpit Control Highlights


Recommended Posts

Does anyone know if it is possible to dynamically control Cockpit Highlights? These are the bounding boxes frequently used in the DCS training missions. I want to highlight the switch/button as it is being manipulated by the pilot.

 

Is there is a LUA command to control this behavior in real time by a 3rd party application? Or do cockpit control highlights need to be built in to the mission itself?

 

Cheers,

Andrew

Link to comment
Share on other sites

They have to be done in the ME but there are specific triggers for that.

 

Check page 92 in the DCS World User Manual.

 

Normally you would use this trigger to detect the switch/button event:

 

COCKPIT ARGUMENT IN RANGE. The position of every cockpit control and instrument is defined by a custom argument ID and valid value range. This trigger checks for a set cockpit argument to be within a set value range. This is most often used to evaluate switch and button states with discrete argument values (such as ‘0’ for off and ‘1’ for on or in decimal values between 0 and 1 for multi-position switches). However, it can also be used to evaluate the position of needle instruments, such as airspeed or vertical velocity, etc.

 Argument – sets the ID number of the cockpit argument to check. Clickable cockpit functions (switches, buttons, knobs, etc.) are described in Scripts\Aircrafts\Aircraft Name\Cockpit\clickabledata.lua. Non-clickable cockpit arguments, such as instruments are described in Scripts\Aircrafts\Aircraft Name\Cockpit\mainpanel_init.lua. The variable “arg” describes the argument ID. The variable “arg_value” describes the increment of each movement of the argument. The variable “arg_limit” describes the limits of the argument’s range of movement.

 MIN – sets the minimum value of the set argument, which will satisfy the condition to execute the trigger. Valid value range is -1 to 1.

 MAX – sets the maximum value of the set argument, which will satisfy the condition to execute the trigger. Valid value range is -1 to 1.

Note, to successfully evaluate an argument, you may need to enter a MIN and MAX range that is inclusive of the desired value. For example, when evaluating an argument to equal to “0.5”, enter “0.49” for MIN and “0.51” for MAX.

 

COCKPIT HIGHLIGHT ELEMENT – enables a cockpit highlight of the specified cockpit control (switch, button, knob, etc.).

 ID – sets the ID of the highlight. The ID can be referenced by other triggers to evaluate the status of or remove the highlight.

 

Once displayed then you need another trigger to turn the display off:

 

COCKPIT HIGHLIGHT IS VISIBLE. Checks for a set cockpit highlight to be displayed. Each cockpit highlight is assigned an ID by the mission designer. This trigger evaluates whether a specific highlight is displayed in the cockpit.

 

The user files section has a downloadable document that contains the codes. I have not tried doing this with planes other than the A-10C but if you can find the clickabledata.lua file that has all of the switch codes in it.

 

To see how they work open one of the training missions in the ME and you will see the logic. Good luck.


Edited by Sabre-TLA

F-15C-User-Bar-ACM.v2.jpg

MapleFlagMissions - Read Our Blog for Updates

Link to comment
Share on other sites

This was my fear, I really need a generic solution that isn't dependent on the mission.

 

I have a proven mechanism for manipulating cursor location ("sticky cursor") based on viewport orientation, but its rather CPU intensive and sensitive to changes in FOV (and any display property that can not be exported). That said, I could use this as a fall back option.

 

Thanks for your input.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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