Jump to content

ajax

Members
  • Posts

    491
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by ajax

  1. I've seen that error message when there is a syntax error in the text of a 'Do Script' entry. The same text run from 'Do Script File' will generate a 'syntax error' message. Don't know why that is, though.
  2. I've run across the same thing, but I believe the manpad has indeed been killed -- the game engine just doesn't change the object to the dead version. I have verified this by reviewing the action using Tacview.
  3. In what ways does it fail? Does the mission use scripts? If so, I know they don't always behave the same in SP vs. MP. When I first started writing scripts I would test in SP. When it worked as I expected it to, I'd try it in MP and find it didn't work at all. I narrowed the problems down to two common faults: 1. Things like adding radio commands must be done with a scheduled function that gets repeated over and over to catch any new clients as they join after mission start. 2. Trapping and using events that only apply to SP thinking it should work for MP.
  4. Glad it worked for you. I don't particularly like modifying core files either, but you do what you have to do.:)
  5. Try a somewhat smaller window than the screen size. I have the same screen res as you, so maybe try the same values?
  6. There's a Lua edit to keep that from happening. I'll see if I can find it. It was a PeterP or Kuky post, I think. Edit: It was PeterP. Here it is http://forums.eagle.ru/showpost.php?p=1373707&postcount=1 Look for the part at the very end of the post that starts with The line number now for the current version of missioneditor.lua is #245 instead of #195 specified in the instructions. After you make this mod, the ME window will stay open when you click on the desktop or switch to another window. Edit2: The instructions are outdated. This is what I changed in my missioneditor.lua file:
  7. ajax

    Bad ka-50 texture

    It's not from a bad cfg and not from a missing file, but from an incomplete texture file: {DCS}\bazar\world\textures\ka-50_general.zip. This is the default skin for the Ka-50. I believe what happens is that when a specified skin (e.g. a custom skin) cannot be found, DCS loads this default skin. Unfortunately, this file package is missing several needed files. These are: ka-50_st_paint1.bmp.dds ka-50-lrm_b.bmp.dds ka-50-lrm_centre.bmp.dds ka-50-lrm-1.bmp.dds ka-50-lrmpart-1.bmp.dds ka-50-paint1-def-01.bmp.dds ka-50-paint1-def-02.bmp.dds ka-50-paint1-def-03.bmp.dds ka-50-paint1-def-04.bmp.dds ka-50-paint1-def-05.bmp.dds ka-50-paint1-def-06.bmp.dds You can solve the problem yourself by scavenging these files from other standard skins and repackaging the zip file. Or, you can download the complete zip file here: http://forums.eagle.ru/showthread.php?t=111573
  8. Make sure the 'Record [DCS World] Flights' is enabled on the Tacview menu (globe icon). It seems after my last update it was unchecked.
  9. Did you tick the 'late activation' check box for these bomber groups?
  10. It could be one of several things. Your title indicates you are using a script -- could you post it?
  11. I wouldn't change it if it's working for you. I noticed yours is in a wrapped action, and if you change it for one of the 'point' tasks it might break the others. I really don't know.
  12. It seems different/extra parameters were added to the unit/route/point/task sub-tables going from 1.2.6 to 1.2.7 (I think--at least this is when I noticed the differences). It might be a good idea to create a test mission with a CAP group that performs like you want then looking at the mission file. (This is what I have to do, I certainly don't know enough to create the proper table structure from scratch.) I compared my ScrambleCAP script (which seems to work pretty well) to the relevant portions of the GCI-CAP script and noticed some (possibly) significant differences. Perhaps these parts of script should be revisited? I don't fully understand what each of these parameters mean, so I'm not sure if the differences are important or not. --GCI-CAP_b6 CAPPatrolpointstable[i]["task"]["params"]["tasks"][1] = { ["number"] = 1, ["auto"] = [color=Red]false[/color], ["id"] = "[color=Red]WrappedAction[/color]", ["enabled"] = true, ["params"] = { ["action"] = { ["id"] = "Option", ["params"] = { ["value"] = 3, ["name"] = 0, }, -- end of ["params"] }, -- end of ["action"] }, -- end of ["params"] }, -- end of [1] --ScrambleCAP group["route"]["points"][1]["task"]["params"]["tasks"][1] = { ["enabled"] = true, ["auto"] = [color=Red]true[/color], ["id"] = "[color=Red]EngageTargets[/color]", ["number"] = 1, ["key"] = "CAP", ["params"] = { [color=Red] ["targetTypes"] = { [1] = "Air", }, -- end of ["targetTypes"] [/color] ["priority"] = 0, }, -- end of ["params"] }, -- end of [1]
  13. Cool!
  14. Alright, this one will check all groups whose name matches the supplied root name. [font=Courier New]-- Lua predicate: anyGroupUnitInZone -- returns true if any unit of any group with a name matching the root name is within the zone -- Usage: trigger type (switched condition) --> Lua predicate (insert this script into text box) --> Do your desired action if true local function anyGroupUnitInZone(rootName, zone) local i,j local groups = {} local iters = {} local redGroups = coalition.getGroups(coalition.side.RED,Group.Category.GROUND) local blueGroups = coalition.getGroups(coalition.side.BLUE,Group.Category.GROUND) if #redGroups > 0 then iters[#iters + 1] = redGroups end if #blueGroups > 0 then iters[#iters + 1] = blueGroups end for i=1,#iters do for j=1,#iters[i] do local group = iters[i][j] local groupName = group:getName() if string.len(groupName) >= string.len(rootName) then if rootName == string.sub(groupName,1,string.len(rootName)) then groups[#groups + 1] = groupName end end end end for i=1,#groups do local group = Group.getByName(groups[i]) if group then local units = group:getUnits() if units then for j = 1,#units do local unitPos = units[j]:getPoint() local z = trigger.misc.getZone(zone) if unitPos and z then local dx = unitPos.x - z.point.x local dy = unitPos.z - z.point.z local d = math.sqrt(dx*dx + dy*dy) if d < z.radius then return true end end end end end end return false end local rootGroupName = 'GroupName' local zoneName = 'YourCaptureZoneName1' return anyGroupUnitInZone(rootGroupName,zoneName) [/font]
  15. Yes, exactly. That way you can increment your flag as each zone is captured. Depending on your needs, you may want to use a 'Once'-type trigger instead of a 'Switched condition'-type. I didn't realize you were using dynamically spawned groups. That complicates things a bit. If all these groups have the same 'root' name, then it could be done without listing them. I'll think about it some more.
  16. Here's a test mission that uses the predicate. unitInZoneTest.miz
  17. I made it for helicopters, but it will work for any type of unit. Anyway, here is a modified Lua predicate to do what you want: -- Lua predicate: anyGroupUnitInZone -- returns true if any unit of any group in group list is within the zone -- Usage: trigger type (switched condition) --> Lua predicate (insert this script into text box) --> Do your desired action if true local function anyGroupUnitInZone(groups, zone) local i,j for i=1,#groups do local group = Group.getByName(groups[i]) if group then local units = group:getUnits() if units then for j = 1,#units do local unitPos = units[j]:getPoint() local z = trigger.misc.getZone(zone) if unitPos and z then local dx = unitPos.x - z.point.x local dy = unitPos.z - z.point.z local d = math.sqrt(dx*dx + dy*dy) if d < z.radius then return true end end end end end end return false end local groupNames = {'GroupName100','GroupName101','GroupName102'} local zoneName = 'YourCaptureZoneName1' return anyGroupUnitInZone(groupNames,zoneName)
  18. That list is from the {DCS}\scripts\database\wsTypes.lua file, which apparently are not the right names for use in a script. I generated this list using the scripting-engine world.getAirbases() function: ID CALLSIGN 12 Anapa-Vityazevo 13 Krasnodar-Center 14 Novorossiysk 15 Krymsk 16 Maykop-Khanskaya 17 Gelendzhik 18 Sochi-Adler 19 Krasnodar-Pashkovsky 20 Sukhumi-Babushara 21 Gudauta 22 Batumi 23 Senaki-Kolkhi 24 Kobuleti 25 Kutaisi 26 Mineralnye Vody 27 Nalchik 28 Mozdok 29 Tbilisi-Lochini 30 Soganlug 31 Vaziani 32 Beslan This is an exhaustive list -- I guess the others are not available for scripting purposes. Hope it helps.
  19. You could use a Lua predicate to test for this. Take a look at one I did for checking if any helicopter has landed in a zone. (Shameless plug warning :)) http://forums.eagle.ru/showpost.php?p=2066145&postcount=7 It wouldn't take much modification to do what you want to do.
  20. You're welcome. It was fairly simple to obtain -- I used mist.dump_tbl() to get the me_db table from within the ME. In it there is a table named nameByDisplayName which essentially the list I uploaded (after some minor text editing to clean it up).
  21. This could be related to the same problem with the Ka-50 -- that is, the HUD or Doppler systems don't get repaired. This function was broken a couple of years ago and has not yet been fixed, much to the dismay of us Shark drivers.
  22. Since it's so much trouble:) here is a list of names used in both contexts: Edit: DCS 1.2.9 Update MISSION EDITOR NAME MISSION SCRIPTING NAME F-86F F-86F Sabre MiG-15bis MiG-15bis MiG-21Bis MiG-21Bis MEvsScriptingNames.txt
  23. No, actually DCS uses different names, one set for the mission editor and another set for the mission. The names are the same for 95%? of the units (just a guess). Another notable exception is the Mi-8 -- for the ME it is Mi-8MTV2 but in the mission it is Mi-8MT. Go figure.:dunno: Edit: Wow! It turns out only about 50% of the names are the same.
  24. The best place to find the unit type names is in the {DCS}\scripts\database\db_countries.lua file -- it will be the most up-to-date list available. The units are differentiated by country so they will be scattered throughout the file.
  25. Do you mean add countries not currently available in DCS? If so, I'm sure somebody has the knowledge to do it but I'm sorry to say I don't. IIIRC, I think someone has actually done that (in a previous version of DCS). I can't remember any specifics. This thread might point you in the right direction: http://forums.eagle.ru/showthread.php?t=54015&highlight=add+country .
×
×
  • Create New...