Jump to content

Trigger an event using a cockpit switch - Cockpit Argument in range?


Recommended Posts

Posted

Hey guys, I'd like to trigger an event when the IR cool switch is turned on in the AV8. In doing some research, I looked in the clickabledata.lua and found this switch to be #420. So how do I set this condition? Here is the line:

 

elements["PTN_420"] = default_2_position_tumb(_("Ground IR Cool Switch"), devices.SMC, smc_commands.Switch_IR_COOL, 420)

 

Unit's argument in range is the condition I want? It asks for a unit, an argument (420?), and a min/max.

 

TIA!

Moe "Moespeeds" Colontonio

vVMA 231

http://www.vvma-231.com/

Looking for a serious US based Harrier Squadron? We are recruiting!

 

Posted

So in testing, I can't seem to get this to work. The switch seems to default at 0, because if I include 0 in my range it trigger. No matter how else I set my limits, it will not trigger.

 

I tried this with the refueling probe, and same result.

 

I then set a continuous action to send a message so I could test switch positions, and no matter what I do, or how I set it up, nothing works unless I include zero in my range. It's as if the switches default to 0, and no matter how you move them, they continue to sit at 0. Is this just another thing in DCS that's broken?

Moe "Moespeeds" Colontonio

vVMA 231

http://www.vvma-231.com/

Looking for a serious US based Harrier Squadron? We are recruiting!

 

Posted

Ahhhh, so it's X cockpit argument in range. So I'm assuming each aircraft has unigue argument numbers?

 

In other words, in the harrier IR cool (switch 420) will trigger the action, but there's no danger of an F18 putting it's gear down and triggering the same action?

Moe "Moespeeds" Colontonio

vVMA 231

http://www.vvma-231.com/

Looking for a serious US based Harrier Squadron? We are recruiting!

 

Posted (edited)
Ahhhh, so it's X cockpit argument in range. So I'm assuming each aircraft has unigue argument numbers?

 

In other words, in the harrier IR cool (switch 420) will trigger the action, but there's no danger of an F18 putting it's gear down and triggering the same action?

 

The X Cockpit will check only the plane that the player flies. Actually I wonder how it works in multiplayer.

 

In the clickabledata.LUA file, what is the entry for that switch (I don't have the plane). But here, as an example, for the huey, for the pitot heat switch it would look that way.

elements["MTR-PTR"] = default_2_position_tumb(_("Pitot Heater Switch, ON/OFF"), devices.ELEC_INTERFACE, device_commands.Button_16, 238 )

Edited by Frag
  • Recently Browsing   0 members

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