Jump to content

Wrecking Crew

Members
  • Posts

    1996
  • Joined

  • Last visited

Everything posted by Wrecking Crew

  1. Hello, FC, I am setting up MOOSE in order to run and edit scripts within the game. A quick question about setting up new project names - my preference is to use spaces and not underscores, like "Mission Template v20N", instead of "Mission_Template_v20N". Will there be a problem with that convention? It does not seem to be an issue... I am looking forward to making this work - it will save me tons of time with my scripting. WC
  2. LOL, I hadn't noticed! That's why I made the much closer Highway Zone. I've prolly flown out to that damn dam a hundred times now. When I looked at the code events last night I saw no reason why the Boulder Dam event triggered at the takeoff.
  3. :beer: Have a beer, I am posting a sympathy response...
  4. Yes, the Tunguskas and TORs will stop to engage, and that hangs up the armor units. Shilkas are not as bad, because they have a smaller engagement zone. You can split out the air defense into a cloned group to keep the routing and speed, and just leave ADA units in it.
  5. Good progress. I will look into the issue later this week. Good: My F-15C 01 Client is now detected in the close-in Highway Zone, using the regular Mist function. I can fly over that highway junction repeatedly and see the 'detected' message each time. I am also detected when taking off in the detectClientTakeoff function. Issue: As soon as I takeoff, and as soon as my wingman takes off, we each get the message that a Blue jet flew over Boulder Dam. Then when I fly over the Boulder Dam I get no message.
  6. OK! Thanks, I was just about to post again and I saw this ^^^. I appreciate your testing it. I'll take a look tonight.
  7. i think it is a bug blue and red radio adds should be added properly, even within the same event. i was a bit surprised that they did not with initial testing of your mission. but i think i've seen this before Moderators - this is a v2.0 BUG
  8. Did I mention that Stryker units are not the best things to be incorporating on the battlefield? :huh:
  9. My aircraft is in the default list of units, F-15C 01. -- There is a Radio F10 option to display the aircraftClientNames content. After I takeoff in my F-15C, I run that Radio command and the result is a display of all the existing a/c units in the mission with Skill = Client and uData.type = if uData.type == 'F-15C' or uData.type == 'AJS37' or uData.type == 'M-2000C' or uData.type == 'MiG-21Bis' then My F-15C's Pilot Name 'F-15C 01' is listed in this result. The detectClientTakeoff code works with the aircraftClientNames properly, but the Mist function does not. 1. The table aircraftClientNames picks up all the Clients that are defined in the mission, even before an actual Client joins in one of those slots. My F-15C Client unit's name, F-15C 01, is in the table when I display its content after takeoff using the Radio F10 menu. 2. At the moment of takeoff, the detectClientTakeoff script works correctly, and this message is displayed: trigger.action.outText(airborneUnitName .. ' just tookoff!', 5), with 'F-15C 01' as the airborneUnitName 3. The Mist function doesn't work when I replace the verbatim unit names with the table name. The Mist function does not recognize my Unit Name, F-15C 01, from the aircraftClientNames table, like the detectClientTakeoff function does. Why doesn't the Mist 'mist.flagFunc.units_in_zones{' pick up the content of the aircraftClientNames table? this detectClientTakeoff works -- do local function detectClientTakeoff(event) local function contains(tbl, val) for _,v in ipairs(tbl) do if v == val then return true end end return false end if(event.id == world.event.S_EVENT_TAKEOFF and event.initiator) then local airborneUnitName = event.initiator:getName() trigger.action.outText(airborneUnitName .. ' just tookoff!', 5) if(contains([color="purple"]aircraftClientNames[/color], airborneUnitName)) then trigger.action.setUserFlag(50003, true) end end end mist.addEventHandler(detectClientTakeoff) end this does not; the flag 90256 is not going true -- mist.flagFunc.units_in_zones{ [color="purple"]units = aircraftClientNames,[/color] zones = {'02 Boulder Zone'}, flag = 90256, toggle = true, } Mission Template 20N0p.miz
  10. The aircraftClientNames table is being loaded with the names of all the defined Clients. The aircraftClientNames table is used successfully in the detectClientTakeoff code that is discussed above. This MIST function code is not working -- mist.flagFunc.units_in_zones{ units = [color="blue"]aircraftClientNames[/color], -- units = {'F-15C 01', 'M-2000C 01', 'AJS37 Viggen 01'}, zones = {'08 Highway Zone'}, flag = 90856, toggle = true, } In the above code, I can comment out the -- units = aircraftClientNames, and uncomment this and it works -- units = {'F-15C 01', 'M-2000C 01', 'AJS37 Viggen 01'}, How to get this to work? The mission is attached. units = aircraftClientNames, Mission Template 20N0p.miz
  11. Here's an event handler example. I made this with a lot of help from the folks here. Put this into a Once event, with Condition like Time More (5), and Action Do Script with this code in it. do local function detectClientTakeoff(event) local function contains(tbl, val) for _,v in ipairs(tbl) do if v == val then return true end end return false end if(event.id == world.event.S_EVENT_TAKEOFF and event.initiator) then local airborneUnitName = event.initiator:getName() if(contains({'F-15C 01', 'F-15C 02', 'F-15C 03', 'F-15C 04', 'M-2000C 01', 'M-2000C 02', 'M-2000C 03', 'M-2000C 04', 'AJS37 Viggen 01', 'AJS37 Viggen 02', 'AJS37 Viggen 03', 'AJS37 Viggen 04'}, airborneUnitName)) then trigger.action.setUserFlag(50003, true) trigger.action.outText(airborneUnitName .. ' just tookoff!', 5) end end end mist.addEventHandler(detectClientTakeoff) end
  12. Here you go - fixed. I split the Radio Adds by Red & Blue. That Radio Remove for the SB-3 needed "Tanker". The Flag 1 Equals 1 Conditions were changed to Flag 1 True - yours worked, but I like Flag Is True better. Operation New Dawn v1.00 wc01.miz
  13. Also, try splitting out air defense units into their own group.
  14. How best to troubleshoot script changes? I made good progress, but spend way too much time making a ME change and then Flying the mission. I used Ian's Witchcraft to test code in v1.5, and this is v2 I'm talking about. Is there a LUA shell, or should I use Witchcraft?
  15. Thank you, Grimes. My Visual Basic & SQL experience doesn't lend itself well to LUA. What you described is similar to another text output I use, but I needed a basic primer on getting the table content. Clients are what I want to put into the table.
  16. What I needed is working now - thank you for the help. You bring up the table elements, above, and I want to show that list, in a test/debug Radio F10 command for "Show Active Aircraft Clients". I have some outText examples to incorporate, like: trigger.action.outText(table.concat(msg), 6) Please, tell me how? trigger.action.outText(aircraftClientNames.concat(msg), 6) -- ?
  17. This is loading on an event once script: aircraftClientNames= {'F-15C 01', 'F-15C 02', 'F-15C 03', 'F-15C 04', 'M-2000C 01', 'M-2000C 02', 'M-2000C 03', 'M-2000C 04', 'AJS37 Viggen 01', 'AJS37 Viggen 02', 'AJS37 Viggen 03', 'AJS37 Viggen 04'} this works -- do local function detectClientTakeoff(event) local function contains(tbl, val) for _,v in ipairs(tbl) do if v == val then return true end end return false end if(event.id == world.event.S_EVENT_TAKEOFF and event.initiator) then local airborneUnitName = event.initiator:getName() trigger.action.outText(airborneUnitName .. ' just tookoff!', 5) if(contains([color="purple"]aircraftClientNames[/color], airborneUnitName)) then trigger.action.setUserFlag(50003, true) end end end mist.addEventHandler(detectClientTakeoff) end this does not; the flag 90256 is not going true -- mist.flagFunc.units_in_zones{ [color="purple"]units = {(aircraftClientNames)}, -- I tried a couple times, how should this line look?[/color] zones = {'02 Boulder Zone'}, flag = 90256, toggle = true, }
  18. That is my next question :-) You are getting ahead of me. I do want this table of unit names to be available to multiple events Do Scrip actions, so that I have just the one table to edit. I will test this over the next week. Thanks, Grimes.
  19. v2.0 I have unit names: {'F-15C 01', 'F-15C 02', 'F-15C 03', 'F-15C 04', 'M-2000C 01', 'M-2000C 02', 'M-2000C 03', 'M-2000C 04', 'AJS37 Viggen 01', 'AJS37 Viggen 02', 'AJS37 Viggen 03', 'AJS37 Viggen 04'} I want to replace: if(contains({'F-15C 01', 'F-15C 02', 'F-15C 03', 'F-15C 04', 'M-2000C 01', 'M-2000C 02', 'M-2000C 03', 'M-2000C 04', 'AJS37 Viggen 01', 'AJS37 Viggen 02', 'AJS37 Viggen 03', 'AJS37 Viggen 04'}, airborneUnitName)) then With: if(contains(<table_name>, airborneUnitName)) then The following scripts depend upon Unit Names. How to create a global table at Mission Start for these values? How does this global table replace the unit names in below examples: do local function detectClientTakeoff(event) local function contains(tbl, val) for _,v in ipairs(tbl) do if v == val then return true end end return false end if(event.id == world.event.S_EVENT_TAKEOFF and event.initiator) then local airborneUnitName = event.initiator:getName() trigger.action.outText(airborneUnitName .. ' just tookoff!', 5) if(contains([color="Purple"]{'F-15C 01', 'F-15C 02', 'F-15C 03', 'F-15C 04', 'M-2000C 01', 'M-2000C 02', 'M-2000C 03', 'M-2000C 04', 'AJS37 Viggen 01', 'AJS37 Viggen 02', 'AJS37 Viggen 03', 'AJS37 Viggen 04'}[/color], airborneUnitName)) then trigger.action.setUserFlag(50003, true) end end end mist.addEventHandler(detectClientTakeoff) end mist.flagFunc.units_in_zones{ units = [color="Purple"]{'F-15C 01', 'F-15C 02', 'F-15C 03', 'F-15C 04','M-2000C 21', 'M-2000C 22', 'M-2000C 23', 'M-2000C 24', 'AJS37 Viggen 01', 'AJS37 Viggen 02', 'AJS37 Viggen 03', 'AJS37 Viggen 04'}[/color], zones = {'02 Boulder Zone'}, flag = 90256, toggle = true, }
  20. Wow - blast from the past! For me it is the LASTE panel, still, and the most used switches are the Autopilot button and 3-way.
  21. Mortifa, You can store your missions on any lettered drive. In the Save Mission dialog box, navigate to the drive\folder and, I think, that destination will be kept. Like Buzzles said, missions from different DCS versions may not open, so I suggest you have a master DCS Missions folder with sub-folders by version, like: DCS V10 DCS V12 DCS V15 DCS V20
  22. Very nice!
×
×
  • Create New...