Purzel Posted Wednesday at 08:17 PM Posted Wednesday at 08:17 PM (edited) Hi, most of you know the issue, that you build a mission and want to preset some values for the player, so he can focus on flying without beeing distracted by inputs while in-flight. Imagine an AAR-scenario for training-purposes, and you just don't have to set this stuff will closing in to the tanker and even your fuel-probe comes out magically... Or (if you have no life ) you could code an personalized startup-sequence or whatever. In this tutorial I conclude several posts from different users so you don't have to search yourself for all informations. This tutorial regards to the F/A-18C "Hornet", but all "keystroke-codes" are different on each aircraft, keep this in mind if you're trying to setup other aircrafts. The tutorial can be used for airbourne or ground starts, I'm not sure, if it will work in multiplayer as well. Ok, let's go: 1.) I strongly recommend "Notepad ++" for editing .lua-files. Please note, that you'll have to set it up for DCS and .-lua-files first. 2.) Be sure DCS is not running. Open your C:\Users\YOUR-NAME\Saved Games\DCS or DCS.openbeta\Config-folder. Copy the lang.cfg-file and insert it in the same folder, rename it to autoexec.cfg ( <<< fastest way to create a .cfg-file) or use this one: autoexec.cfg Open the autoexec.cfg and insert the following code and save it: input = { command_code_tooltips = true, } 3.) After saving the file, you can close the window and open DCS. 4.) In DCS go into the options-menu (the gearwheel-symbol on top) > controls, and hover your mouse over the keyboard commands and will show you the device ID and key-stroke codes: This is the step you will have to do for every specific aircraft itself. You cannot read out the codes while ingame, you'll have to go the way from the main-menu! (click to enlarge) (This is the step you will have to do for every specific aircraft itself. Codes from the AH-64D are not the same as the A-10C, as the F-16, etc.) For the F/A-18C I've uploaded a file with the most needed codes. Keycodes DCS.xls Else you'll have to note all needed keystrokes with ID, Down- and Up-values. (Note that the down value "1" is only to push a button down, it will not get back until you create a new trigger with the UP-value "1". As an example: The TCN button is listed as ID 25, Down 3001, Up 3001. Note, that UP and DOWN are the same values. Create a new trigger "ONCE - Time more than 1 sec. - X: COCKPIT PERFORM CLICKABLE ACTION" with the following Values: Cockpit Device: 25, Command: 3001, Value:1 (This is the UFC TCN-button pushed down) It works in DCS as just a push of the TCN-button, but it stays pushed in and it will not glide back out. To released the button again you'll have to copy trigger and change the value to "0": Cockpit Device: 25, Command: 3001, Value:0 (This is the UFC TCN-button released) To change your TACAN to Ch.18 X, you have to know the keystroke-sequence (X is standard, so I'll let this out here, "Option1" is the upper one of five round buttons) (TCN - Option1 - 1 - 8 - ENT - ON/OFF) , now search in controls every keystroke you would have to do with mouse and note them. 5.) After all go into the mission-editor place your unit and open the triggers. Create the triggers (Type "ONCE", Condition: "Time more") as shown in the picture: Note that every button is triggered a second time "in and out". This will all happen in a second and your aircraft is good to go. I hope someone can use this tutorial. Greets Purzel Kudos to @Rudel_chw and @Yurgon and all others, who put their informations and efforts into this forum! Edited yesterday at 10:35 AM by Purzel 3
Yurgon Posted yesterday at 01:20 AM Posted yesterday at 01:20 AM Awesome, cool to see this in action and great explanations! 1
Recommended Posts