How to set up toggle switches (a tutorial) - Page 67 - ED Forums
 


Notices

Reply
 
Thread Tools Display Modes
Old 02-21-2020, 08:38 AM   #661
Think404
Junior Member
 
Join Date: Feb 2020
Posts: 2
Default

I have made a simple button box with some on/off switches. I want one of the switches to toggle the Master Arm switch in the F18.
Got it to work with the following code, but sometimes the switch is reversed and I have to pause the game and put the switch in the right position.
I know there is a way to avoid this, but i can't get it to work..

Code:
{	down = SMS_commands.MasterArmSw_EXT, up = SMS_commands.MasterArmSw_EXT,		cockpit_device_id = devices.SMS,	value_down =  1.0, value_up = 0.0,		name = _('Master Arm Switch - ARM/SAFE'),	category = {_('Instrument Panel'), _('Master Arm Panel')}},
I have read the PDF and most of the posts in this topic, still having some trouble. Any help would be appreciated.
Think404 is offline   Reply With Quote
Old 02-21-2020, 09:45 AM   #662
LeCuvier
Senior Member
 
Join Date: May 2013
Location: South of France
Posts: 1,853
Default

@Think404: The command suffixed "_EXT" toggles (cycles) ON/OFF. Here is the line of code I use:
Code:
{down = SMS_commands.MasterArmSw, up = SMS_commands.MasterArmSw, cockpit_device_id = devices.SMS, value_down =  1.0, value_up = 0.0, name = _('Master Arm Switch 2-Pos ARM/SAFE'), category = {_('Instrument Panel'), _('Master Arm Panel')}},
This works with a maintained ON/OFF switch as expected.
__________________
LeCuvier
Windows 10 Pro 64Bit | i7-4790 CPU |16 GB RAM|SSD System Disk|SSD Gaming Disk| MSI GTX-1080 Gaming 8 GB| Acer XB270HU | TM Warthog HOTAS | VKB Gladiator Pro | MongoosT-50 | MFG Crosswind Pedals | TrackIR 5
LeCuvier is offline   Reply With Quote
Old 02-21-2020, 08:48 PM   #663
Think404
Junior Member
 
Join Date: Feb 2020
Posts: 2
Default

Thanks a lot!
Think404 is offline   Reply With Quote
Old 02-27-2020, 03:27 PM   #664
Menessis
Member
 
Join Date: Jul 2012
Posts: 206
Default

Before I jump in with both feet I’m wondering if anyone has put together a utility to stream line this process? Would help with not needing to learn all this code. A steep learning curve for sure.

Thanks Menessis
Menessis is offline   Reply With Quote
Old 02-27-2020, 03:58 PM   #665
LeCuvier
Senior Member
 
Join Date: May 2013
Location: South of France
Posts: 1,853
Default

Quote:
Originally Posted by Menessis View Post
Before I jump in with both feet I’m wondering if anyone has put together a utility to stream line this process? Would help with not needing to learn all this code. A steep learning curve for sure.

Thanks Menessis
It's not difficult. Download the document in this post https://forums.eagle.ru/showpost.php...&postcount=214
and invest a little time!
__________________
LeCuvier
Windows 10 Pro 64Bit | i7-4790 CPU |16 GB RAM|SSD System Disk|SSD Gaming Disk| MSI GTX-1080 Gaming 8 GB| Acer XB270HU | TM Warthog HOTAS | VKB Gladiator Pro | MongoosT-50 | MFG Crosswind Pedals | TrackIR 5
LeCuvier is offline   Reply With Quote
Old 02-27-2020, 04:19 PM   #666
Menessis
Member
 
Join Date: Jul 2012
Posts: 206
Default

Thanks LeCuvier. I DL The PDF already. Now to dig in I guess.

Yikes

Menessis
Menessis is offline   Reply With Quote
Old 02-27-2020, 11:24 PM   #667
Menessis
Member
 
Join Date: Jul 2012
Posts: 206
Default

Quick question. Is it possible to edit the lua file while the DCS is running? Alt Tab in and out to see if things are going the way you want/think.
Would save a lot of time loading the sim.


Thanks
Menessis
Menessis is offline   Reply With Quote
Old 02-28-2020, 04:13 PM   #668
LeCuvier
Senior Member
 
Join Date: May 2013
Location: South of France
Posts: 1,853
Default

Quote:
Originally Posted by Menessis View Post
Quick question. Is it possible to edit the lua file while the DCS is running? Alt Tab in and out to see if things are going the way you want/think.
Would save a lot of time loading the sim.


Thanks
Menessis
That would help a lot but it doesn't work. I believe that the software reads all .lua files when it starts and ignores changes you make afterwards.
__________________
LeCuvier
Windows 10 Pro 64Bit | i7-4790 CPU |16 GB RAM|SSD System Disk|SSD Gaming Disk| MSI GTX-1080 Gaming 8 GB| Acer XB270HU | TM Warthog HOTAS | VKB Gladiator Pro | MongoosT-50 | MFG Crosswind Pedals | TrackIR 5
LeCuvier is offline   Reply With Quote
Old 02-29-2020, 10:49 PM   #669
Menessis
Member
 
Join Date: Jul 2012
Posts: 206
Default Hmmmm Noob question #1

Well right off the jump it's playing games with me. For some reason after creating a new entry in the default.lua it will only let me map it to the rudder pedals and not the throttle?
I checked to make sure I wasn't in the pedals file.


Any thoughts?


Thanks
Menessis
Menessis is offline   Reply With Quote
Old 03-02-2020, 08:45 AM   #670
LeCuvier
Senior Member
 
Join Date: May 2013
Location: South of France
Posts: 1,853
Default

Some modules have dedicated .lua files for specific game controllers. For example, the FW-190D has a file "Throttle - HOTAS Warthog.lua". In that case, the "default.lua" will apply to all game controllers except the TM WH throttle. And any command that you want to bind to a switch on the TM WH throttle must be added to the file "Throttle - HOTAS Warthog.lua". I think that's stated in the tutorial document. If that does not solve the problem, which aircraft gives you the problem?
PS: Ignore the .diff.lu files in that context!
__________________
LeCuvier
Windows 10 Pro 64Bit | i7-4790 CPU |16 GB RAM|SSD System Disk|SSD Gaming Disk| MSI GTX-1080 Gaming 8 GB| Acer XB270HU | TM Warthog HOTAS | VKB Gladiator Pro | MongoosT-50 | MFG Crosswind Pedals | TrackIR 5
LeCuvier is offline   Reply With Quote
Reply

Tags
controls, lua, tm warthog, toggle switches, tutorials

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 12:12 AM. vBulletin Skin by ForumMonkeys. Powered by vBulletin®.
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.