Jump to content

X: cockpit highlight element action via script


Go to solution Solved by cfrag,

Recommended Posts

Posted (edited)

Is it possible to trigger the "X: COCKPIT HIGHLIGHT ELEMENT" action through lua?

I would like to create exactly the same we get on the startup tutorial missions, but I would like it to be through a script that I could simply add to any of my missions (using SET_CLIENT for example to detect which aircraft is used and launch the appropiated tutorial) without the need of copying all the triggers used on each ED's tutorial every time I want to add it to a mission.

In summary, I would like to be able to copy startup tutorials easily on my sandbox missions 😛

Edited by Darcaem
  • Solution
Posted
On 10/20/2024 at 12:09 AM, Darcaem said:

Is it possible to trigger the "X: COCKPIT HIGHLIGHT ELEMENT" action through lua?

Not directly, no. But looking at what you are trying to do, i think that would be the least of your challenges:

On 10/20/2024 at 12:09 AM, Darcaem said:

I would like to create exactly the same we get on the startup tutorial missions, but I would like it to be through a script that I could simply add to any of my missions

Uh - you're in for a hellish experience here. Tutorials usually read/set cockpit switches and await control inputs using the miz actions "X" tree which are mostly unavailable via normal scripting (you can read the value of a cockpit/3D model item using unit.getDrawArgument(), but AFAIK you can't set it, so you'd have to resort to active polling and asking the player to change the setting of that model item. Each aircraft has it's own model items, they do not have standardized names, and finding an argument value for a specific plane for a specific switch is a painful procedure involving the model viewer. 

Add to this the fact that in single-player you may be able to figure out what kind of aircraft "you" are flying, that is impossible in MP - the is no concept of 'I' in mission scripts.

On 10/20/2024 at 12:09 AM, Darcaem said:

using SET_CLIENT

What invocation is that? What does it do?

On 10/20/2024 at 12:09 AM, Darcaem said:

I would like to be able to copy startup tutorials easily

I believe everyone agrees that this would be great. Currently, I don't see a way to do it in vanilla DCS. Mayhaps if you have access to ED's private mission scripting tools for third paries.

  • Like 1
  • Recently Browsing   0 members

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