Jump to content

AKA_Clutter

Members
  • Posts

    583
  • Joined

  • Last visited

Everything posted by AKA_Clutter

  1. @Flasham @cfrag is one of the greybeards of scripting and knows DCS API backwards and forwards. He is correct in the fact that scripting isn't for the faint of heart, and mainly because of the documentation. He and @Grimes have done a lot and the hoggit wiki is a great source. I am still very wet behind the ears but find scripting fun. As to getting a group to fire, then deactivate it and activate another group, I created a simple mission (yes the computer decided to work today). I'm not sure they fire, but this should give the basics of how to do it in the ME. Scripting would be much more elegant but would take more time to develop (for me at least) Simple_Arty_group Activation.miz
  2. OK, I have no idea if what I am trying to do is possible. What I would like to do is capture the 'menuID" of a F10 Other submenu assigned by another script and then pass it to a separate script so that I can add to the sub menu. I would like to do this rather than try and modify the other script to include mine. For example, Script #1 sets up the follow f10 Other F10 Other F1 - Menu item 1 F1 - Menu F1 submenu F1 F2 - Menu F1 submenu F2 I would like to capture the path given to "F1- Menu item 1" and pass it to a second script, so that other script could add item "F3- menu F1 submenu F3" So that I end up with F10 Other F1 - Menu item 1 F1 - Menu F1 submenu F1 F2 - Menu F1 submenu F2 F3 - Menu F1 submenu F3 I have tried this with the code snippets below but all I get is F10 Other F1 - Menu item 1 F1 - Menu F1 submenu F1 F2 - Menu F1 submenu F2 F2 - menu F1 submenu F3 So is it possible to do what I am trying to do. Snippet from the script file that generates the initial F10 Other menu (This works fine, although it may be clumsy) local menuID = missionCommands.addSubMenuForCoalition('2' , 'Scout Recon Missions') globalMenuID = menuID for i=1, Squd_Type_Max-1 do missionCommands.addCommandForCoalition('2' , TBL_Sqaud_Names[i][1] , menuID , Activate_Scout_Target_Squad,i) end -- Add submenu for Random call, menu item # should be Squd_Type_Max missionCommands.addCommandForCoalition('2' , TBL_Sqaud_Names[Squd_Type_Max][1] , menuID , Scout_Recon_Random_Group_Main,Squd_Type_Max) Script to try and use the global variable. This is done 30 seconds after the script above. function menuTest () trigger.action.outText("\n=============================\n\nSIMPLE TEST OF PASSING MENU IDn.\n\n=============================", 15) end missionCommands.addCommandForCoalition('2' , "Simple Test Of Passing Menu item" , globalMenuID, menuTest) Thanks for the help.
  3. @tmansteve Here is a simple mission that I think does what you want it to do. Hope it helps Simple Test of Ship Activation.miz
  4. Google is your friend. The link below references an Action “group deactivate” that you can set in the Mission Editor (ME). I haven’t used it myself, but worth a try. https://forum.dcs.world/topic/191815-trigger-quotgroup-deadquot-and-quotgroup-deactivatequot/ So what you could do is. 1. Make a scud group, group 1, and set the route and fire orders you want. 2. Make a second group of scuds, set the route and fire orders as desired. Have this group set to late activation. 3. Set up a trigger to deactivate scud group 1 after so much time. You can also do this based on when they reach the last waypoint, or enter a zone. As part of the actions of this logic set a flag to true. For example set flag 950 to true 4. Add another trigger with the continuing of flag 950 = true with the action of activating scud group 2. hopefully this is clear enough for you to okay around in the ME and figure out how to set triggers, conditions, and associated actions. Any time you spend in the ME will not be wastes. Now, I assumed (right or wrong) that you were looking at doing this via the ME and not Lua scripting. You can do similar things via scripts if you wish. Hope this helps to point you in the right direction.
  5. First, I'm not much pastvthe noob stage. Secondly, my computer has "issues" so I can't fire things up in the ME ti look at things are do any test. From a short look on the internet, and a brief look at command listing g I. Tge Hoggit wiki, I'm not sure you can assign individual targets to individual units. This may be a "group" action only. I did find this, and it would be worth a read. https://wiki.hoggitworld.com/view/Mission_Editor:_AI_Tasking Hopefully someone else with more knowledge will respond. Good luck.
  6. I haven't used mist.cloneGroup before so I don't know. I know that mist.teleportInZone will make the cloned, teleported in group active. When I used it, my template group was "late activation" and was "active" after execution of the function.
  7. I'm not where I can test this, but here is my suggestion. Use MIST function mist.teleportInZone() to spawn the group. You will need to create a template of tge group you want to spawn and put it somewhere out telephoned. I have used this to respawn tge same group once it has been destroyed. https://wiki.hoggitworld.com/view/MIST_teleportInZone I think you can then use DCS API group.destroy () to destroy the group you teleported. I haven't used this myself, so am a little unsure. https://wiki.hoggitworld.com/view/DCS_func_destroy Good luck. Clutter
  8. THANKS! Couldn't have gotten as far as I without all of you here snd youtube. I usually watch a few on the same subject and have found that most beneficial. Each presents things a little differently.
  9. Thanks for the reply and suggestions. I've done this to a degree znd have a few scripts that work. Some started as as strictly brut force solutions, but I'm now getting better with simple tables, functiona, and loops rather than just copying a lines of code and changing the names. I've seen several things on the internet about Lua not being a proper OOP language, but yet the DCS API, MOOSE, and MIST (I think) uses classes, objects and methods everywhere. On some of the example scripts I've looked at, I got lost because of "self" and ":. I'm getting a handel on those I think. I'm think this is necessary to understand what the api is doing and is expecting. And to date it has been a fun, while frustrating at times, journey. Thanks again for the information. I too have the Eclipse LDT as well as the MS one, and of course Notepad++. I use LDT mostly for development and notepad++ for quick changes. Still trying to figure out exactly have to best use Eclipse LDT. Thanks
  10. Thanks. I am on the MOOSE Discord, but mainly have been working with the API to get a good understanding of what lies beneath MIST and MOOSE. I'm still struggling with traversing tables, ipairs and pairs, but think I'm getting there. Snd slowly wrapping my head around classes(which is a table) and objects. Thanks again for the feedback and response. Clutter.
  11. As the title alludes to, this is a question around how much Lua should I learn to effectively create scripts using tge DCS API, MIST, and or MOOSE. I've been playing around with Lua and scripts over the past year or so and have learned some, but there is a whole lot of stuff I don't know. I have three books on lua programing. I'm looking for some guidance as to what parts of may not be tgat valuable/worthwhileto chase down. I know that i will need a good understanding of the basics, tables, OOP in lua, meta tables and methods, and such. But what about "weak tables", coroutines, standard lua libraries, "modules and packages"lug debugging library, snd so on and so forth. Any and all suggestions and guidance will be greatly appreciated. Thanks Clutter
  12. @cfrag, Just found this and looking forward to trying this. I tried making a mission similar yo this for me, so eill be interested is seeing how you dif tge scripts as well.
  13. Niw, that I'm not sure of. I started outside their range snd flew in. I'll see if I can tell a difference. Thanks.
  14. OK, So I ran a test woth a single Igla-s and another group with a Igla-s snd a Igla-s C2 in close proximity to each other. Both igla-s shot 3 missiles at me. I flew close to the Group with the Igla-s C2 for about 10 minutes and it did NOT shot at me again. From this I would say the C2 does not ream the Igla-s. I hope someone from ED sees this and can tell us what the difference is, znd if the c2 adds any advantages.
  15. I setup Eclipse IDE with MOOSE a few years back. I have used this to develop several different scripts and haven't used MOOSE yet. For the most part I don't recall MOOSE being intrusive, or being an issue. I have used MIST in several of these scripts and there weren't any conflicts or issues in those cases as well. I've also used Visual Studio code with the lua extensions as suggested by tempest.114 above as well as notepad++.
  16. Yeap, you read my question 100% correct. And I suspect that your answer would be the answer. I have the script that generate the F10 menu. The person in our squad used something called "automan" and it appears to generate the menu items. I know enough lua/scripting to get into trouble. I will take another look and see if I can figure out where to insert my submenu. Thanks for the response and help. Now to dig myself a deeper hole.
  17. I nay try setting up a simple mission to check this out.
  18. Hi, I need a lot of help with this function, primarily revolving around the "path" argument. I am working with a mission that was originally setup by someone else in our squad. It is setup to automatically generate a F10 "Other" menu dynamically, based on a naming scheme. the naming scheme Root_Name1!Name2!Name 3! etc. with the "!" as the delimiter. I want to add a menu item about 3 levels down. I have tried recreating the "path as local subR = missionCommands.addSubMenu('Wargame Assets') local subN1 = missionCommands.addSubMenu('Helicoptor', subR) local subN2 = missionCommands.addSubMenu('Ground Range', subN1) local menuID = missionCommands.addSubMenuForCoalition('2' , 'Scout Recon Missions', subN2) The results of this is two "Wargame Assests" under the F10 "Other" menu, and neither works properly. Any ideas on how to do this, or IF it can be done? TIA
  19. Thanks! That helps and explains why it does shoot itself.
  20. OK, I got a little unlazy and did some testing. The SA-18 Igla-S appears to be a single unit with a single launcher. It seems to be set to auto detect and fire on an enemy unit. The SA-18 Igla-S C2 appears to be a single unit with two launchers on the ground. with just spawning the unit with it's defaults, it doesn't engage any air assets even when they fly directly over it. I tried setting the Additional Commands Free fire and use Aire weapons (I think this is what it was). but that had no impact. I don't know if this is some kind of extar ammo supply for the SA-18 Igla-S or not.
  21. Hi, This probably isn't the current forum but didn't see anything better. Can someone tell me the difference between the SA-18 Igla-s and SA-18 Igla-s C2 units in the ME? TIA
  22. OK, Stupid me. I was wanting to do one thing and thought I found the magic bullet. Nope. Went back and read the description of this function and it is doing EXACTLY what it said it would do. To moves an existing group to a random location in one of the specified zones, randomly What I was trying to do was to SPAWN a group in one of several zones randomly. Back to the drawing board.
  23. All, I'm trying to learn how to use this MIST function. Seems simple, but I've screwed something up. I have a group defined as Hiden_Squad_1 and have 4 zones defined as Search_Zone_1, Search_Zone_2, Search_Zone_3, 'Search_Zone_4. And it doesn't work. I load MIST v 4.5.126 when time is more than 1 second, and then run this as a do script after time is more than 20 seconds. I have tried having the group active at the star and on the map or set up as late activation. What am I missing? Do I need to have MIST generate a table of units and/or zones at the start? TIA do mist.groupToRandomZone('Hiden_Squad_1', {'Search_Zone_1', 'Search_Zone_2','Search_Zone_3', 'Search_Zone_4'}, 'cone', nil, nil, true) end
  24. @Vakarian Thanks for the response. Yeah, I have 3 powered USB hubs, some newer than others. The AH-64D grip does have a t0one of leds, sop that might be why it wasn['t working when plugged directly into the motherboard. However, I first had it plugged into a add-in board with 5 usb ports powered by a molar plug directly from the psu. and it worked fine up until this last patch. Makes no sense that a patch would change that. This mystery may remain unsolved, like so many "why did it do that" mysteries.
×
×
  • Create New...