Jump to content

AKA_Clutter

Members
  • Posts

    583
  • Joined

  • Last visited

Everything posted by AKA_Clutter

  1. Do you mean as a single line/set of text rather than doing something fancy. Also, I have been using Eclipse LDT and VS Code as IDE for learning Lua. I do have Notepad++ as well. Will have to look into them for word wrapping ability. And thanks once again.
  2. Grimes - Thanks for the reply. I still learning and don't know much about tables, yet. I didn't express my question very well at all. It is more of an editor issue. If I enter a wall of text in the DCS ME MESSAGE action, it wraps around and easy to see. If I enter the same text in a DCS script, it all appears on one line in the editor. THAT makes it difficult for me to read and edit. The example below would appear on a single line in the editor. trigger.action.outTextForGroup(Helo_Group_ID, "There is a column of M2A2 Bradley IFVs in front of you. Fly through the center of them and that will point you towards the hot LZ area. Once you are within 1 mile of the LZ, two flares will be popped marking the LZ. As you approach, more flares will be popped at 10 and 20 seconds. Additionally, there is a burning HMMWV Jeep near the hot LZ") So my question is if there is a way to break this up so that it is easier to read in the editor. I thin I found the answer to my question in lua, but haven't yet tested in DCS. Here is what I found print ("this is the first part on this one line. " .. "This is to see if this is on the same line." .. " And a third line just to see if this is the limit") The results of this is this is the first part on this one line. This is to see if this is on the same line. And a third line just to see if this is the limit Which solves my issue. Now to see if it works in DCS. That or see if the IDEs I use has something like word wrap in notepad. This doesn't makes sense as it would me very confusing. NOTE - This works in Lua 5.4.2, not sure about 5.3.1 or earlier versions. Again, thanks for the help. I know I will use it in the future once I learn about tables and now to read files from within LUa/DCS.
  3. I have the following long line of test I would like to print via a script. "There is a column of M2A2 Bradley IFVs in front of you. Fly through the center of them and that will point you towards the hot LZ area. Once you are within 1 mile of the LZ, two flares will be popped marking the LZ. As you approach, more flares will be popped at 10 and 20 seconds. Additionally, there is a burning HMMWV Jeep near the hot LZ" I know how to do it, as long as all of the text is on a single line. I also know you can output text in using the multi line format of print [[ "A multi-line text message. However each line appears on a line when printed"]] I think you could do this by assigning portions of the sentence to temporary variables and then concatenating the variables (e.g., print (a .. b .. c), but that seems like a inefficient way of doing it. So my question is there a way to break this up so that all the text doesn't have to appear on a single line?
  4. Is it possible to get the TCS Plus collective base to show up in TM's TARGET software. I know that others have gotten the warBRD base to show. Thanks
  5. You may have your test too close to tell the difference. I modified the file you sent earlier by 1) changed first REPETIVE trigger to SWITCHED trigger 2) Change the F-18 to start outside the zone and made the time between changed states longer. It seemed to work as indented in my test. Also attached is a screen shot of where I use the same approach. Just change the "DO SCRIPT command to a MESSAGE command. Good luck. Message-Loop-EDIT.miz
  6. AS Spanker shows, the issue with your initial logic as the "Repetitive" trigger kept turning the flag back on.
  7. Thanks Grimes. And yes syntax matter as I keep learning. That is what I get from typing the message in MS Word first. Now to go and see if I can actually do what I want to do.
  8. I’m in the process of trying to learn Lua and Scripting in DCS. What I would like to do is to send a message to the client. 90% of that is generic information. The client specific part would be the players name and the type of helicopter they are in. I know how to get both of those. I am not sure how functions are called or used by DCS since I’m still learning about those. What I am wondering is if I could implement this by using a function that contains most of the generic message. And just give pass it the client specific information. My thought is to have the function in a file that is loaded at Mission start and then call that function via triggers in the ME. SO thoughts of the flow are shown below. So my questions are: 1) Is this how functions basically work in the DCS Scripting environment 2) Will my basic approach work. 3) Will the function be "global" defined in this manner, and is that OKI?. I’m not looking for a direct solution , just pointers for me to go research and test. Am I'm on the right track, or totally missed the boat. Thanks in Advance Script file – Load this at mission start. <><><><> function Message_out ( Group_ID, C_Name, Helo_type) trigger.action.outTextForGroup(Group_ID, '\n\nWelcome ' .. C_Name .. ' \n\nYou are in a ' .. Helo_type, 15) end <><><> Do Script – Performed as an action when ME conditions are met Local Group_ID = …. Local C_Name = …. Local Helo_type = …. Message_out ( Group_ID, C_Name, Helo_type) -- this is meant to call the function with the necessary parameters.
  9. I don't do FB. What do they cost?
  10. WOW! Thanks for the detail walk though of the script. This should help @Gierasimov to determine if they can do what they want to. It will also help me as I am trying to learn scripting and lua itself.
  11. Here is the thread I talked about above.
  12. Thanks, Yes, it is executed by a set of triggers and uses zones. My intent is to try and script as much of this as possible so that it is more generic. I have a group of triggers for each helicopter type (and 4 of each). I've included some flags to easily change the "goal time". Once I finishing testing this latest change, I plan on putting up for others to try and tweak as they wish. As far as more scripting goes, I am thinkin g of a scripts with the F10 menu where you can choose to practice Hot LZ landings. And it needs to allow for any existing helicopter type. I think it is doable, but I have a LOT to learn about LUA and the DCS API before I get to the finish line. Thanks for the encouragement.
  13. I know that someone developed a script for the SA342 to lase targets for other planes. It uses the sight in the SA342M. Given this< I would think what you want to do is possible. I will see if I can find the thread.
  14. You have to repeat the Time Since Flagfg for the second OR. as written it is (Time since AND Unit Alive G1) OR Unit Alive G2. To get it to do what you want you need Time Since FLAG (3000,30) Unit Alive G1 [OR] Time Since FLAG (3000,30) Unit Alive G2 You can do this pretty easily by just duplicating the Time since flag and moving one below the OR.
  15. @cfragI'm always up for suggestions. Thanks for taking the time to respond. I have dabbled in developing a few scripts using the DCS Lua API (Is that the correct way to refer to it?). Attached is one such script. Not pretty, and I'm sure it isn't efficient, but it does get the job done. And I learned a lot in doing it. I guess my thought is to lean lua fairly well before diving too deep into making scripts, as well as diving into MIST and MOOSE. May not be the shortest path, or the best, but should be fun. I have Notepad++ and have used it for years, for many different things and think it is great. However, to learn lua I think that I want something more like an IDE. My issues is that I don't know enough about them to get them configured correctly. Hopefully I['ll stumble onto something sometime. Simple_Script_1.txt
  16. WOW! Not what I was asking, but this is GOLDEN!!! Will save a ton of time! Thanks!!
  17. Humm, will have to look into it one day soon.
  18. LOL I'll have to pass on the "jupyter framework" a pass atm. I have lua, python and C++ books I'm trying to plow through.
  19. It will be interesting to watch this topic and see the response. The times that I have looked at the ME file in Notepad++ things seemed so spread out and in multiple places that my guess is that it isn't practical, but who knows.
  20. I've done that some and my primary goal is learn lua as well as doing scripting for DCS. I know that you can do "do file ... ... " to execute a file in the shell. However for nested ifs and such, it seems like an IDE would be better in the long run. Can you connect the interactive console to a DCS session?? Assuming that is true 1) WOW, and 2) WAY way above my head at the moment. Thanks for the response.
  21. Hi all, As the title suggests, this isn't directly relat4ed to DCS or building missions. I am in the process of trying to teach myself lua so that I can 1) understand the DCS API, 2) understand MIST, 3) understand MOOSE, and 4) and write my own scripts. I have lua installed and am trying to get an IDE (or something like that) where I can write simple lua scripts to learn the language. I have Eclipse-LDT and VS Code (with the sumneko lua extension and the Actboy168 Lua Debug extension). I'm having issues (different)with both. What I would like to be able to do is type in the code, then run the code to see how it works, or where the issues are. So, given the above, what would you recommend as an IDE to learn lua with, and are there guides to help me get them working. Thanks, Clutter
  22. Look into the resale market for a Q2 in your country. That might be an option.
  23. What! We can fly after we retire. Ut Oh, I am retired and still fly! Question is will we hear ANYTHING before I die.
  24. I only have the G2 so can only compare specs. I do have a Rift S. When I first got my G2, I was hesitant about the level of upgrade. Then I put the Rift S back on. The level or resolution and lack of "screen door effect" was stunning. Never looked back. Your rig can run the G2 without issue. Go with the G2 (especially if they are still at $450). Oh, the FOV between the two are about the same.
×
×
  • Create New...