Jump to content

get cockpit arguments using lua possible?


Igneous01

Recommended Posts

I've looked at the wiki (http://en.wiki.eagle.ru/wiki/Simulator_Scripting_Engine/DCS:_World_1.2.1/Part_1) and other places regarding what data we can get using lua, but I cant find anything in regards to fetching cockpit arguments.

 

I know this can be done via triggers, but I'd rather build a function that I can quickly use to get the values of a certain panel or instrument.

 

For example: I want to create a set of functions for getting the players R-800 radio values from the black shark.

 

I want to check if the player can actually send a message to an ai unit before sending it (ie. PlayerObj.R800.PowerOn && PlayerObj.R800.Frequency == 135.50) as an example.

 

What is the object/function/property that I need to use to acquire these arguments?

Developer of Kaukasus Insurgency - a customizable Dynamic PvE Campaign with cloud hosting and stats tracking. (Alpha)

 

http://kaukasusinsurgency.com/

Link to comment
Share on other sites

If you want to interact with the cockpit from a mission script, you are limited to the trigger functions that ED made available. Your mission will also only work in single player.

 

While the mission editor apparently generates calls to Lua functions for the conditions and triggers you create, these functions are not available in the execution context of mission scripts. Mission scripts only get access to what is exposed via the "trigger.action" object.

 

It looks like in terms of interacting with the clickable cockpit from mission scripts, ED only added what they needed to build the interactive tutorials.

Link to comment
Share on other sites

Well... thats extremely unfortunate. Whats the point of having lua when theres no reason to use it? Besides this, there is nothing particular I can accomplish with lua that I cant already with triggers and flags.

 

Oh well, I guess I'll play around with trigger sequences to see if I can have some sort of fsm like choice tree for communications. So far I have not been impressed with the mission editor in DCS. Its so limited compared to the one shipped in Arma.

Developer of Kaukasus Insurgency - a customizable Dynamic PvE Campaign with cloud hosting and stats tracking. (Alpha)

 

http://kaukasusinsurgency.com/

Link to comment
Share on other sites

  • Recently Browsing   0 members

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