Jump to content

gromit190

Members
  • Posts

    167
  • Joined

  • Last visited

Everything posted by gromit190

  1. Hi all, What's the best way to get units in a zone? I'm using MIST, btw local zone = trigger.misc.getZone("Some zone") -- Now how to get the units in this zone Can I use the MIST tables for this? I see other people have gound units like this local redVehicles = mist.makeUnitTable({'[red][vehicle]'}) So I could do the same, then iterate through the units and check if they are close enough (i.e. insize the zone). But surely there should be a better way for this basic feature? Cheers
  2. Get all units in a given zone Hi all, What's the best way to get units in a zone? I'm using MIST, btw local zone = trigger.misc.getZone("Some zone") -- Now how to get the units in this zone Can I use the MIST tables for this? I see other people have gound units like this local redVehicles = mist.makeUnitTable({'[red][vehicle]'}) So I could do the same, then iterate through the units and check if they are close enough (i.e. insize the zone). But surely there should be a better way for this basic feature? Cheers
  3. Thanks, really nice script and a great idea! I'll have to dig into it later today. Wow, MOOSE is really immense.
  4. Thanks guys! It's strange, even though I map the Y coordinate to Z, it still seems very "off" from my lat/long coordinates. Strange, the info bar comes up, but it doesn't change coordinate systems when I toggle it again. On the third toggle it disappears again so there's obviously some toggle inbetween... But all I see is lat/long coordinates. Okay so I tried to figure what lat/long coordinates that are correct to get the group to spawn where I want. This is the code: -- Initialization if (initialized == nil) then initialized = true end function test() local coordinate3 = coord.LLtoLO(42.24, 42.66) local coordinate2 = { x = coordinate3.x, y = coordinate3.z } local lat, long, alt = coord.LOtoLL(coordinate3) local msg = coordinate2.x .. "," .. coordinate2.y trigger.action.outText(msg, 1) local groupData = { ["visible"] = false, ["taskSelected"] = true, ["route"] = { }, -- end of ["route"] ["groupId"] = 2, ["tasks"] = { }, -- end of ["tasks"] ["hidden"] = false, ["units"] = { [1] = { ["type"] = "LAV-25", ["transportable"] = { ["randomTransportable"] = false, }, -- end of ["transportable"] ["x"] = coordinate2.x, ["y"] = coordinate2.y, ["unitId"] = 2, ["skill"] = "Excellent", ["name"] = "Ground Unit1", ["playerCanDrive"] = true, ["heading"] = 0.28605144170571, }, -- end of [1] }, -- end of ["units"] ["name"] = "Ground Group", ["start_time"] = 0, ["task"] = "Ground Nothing", } -- end of [1] coalition.addGroup(country.id.USA, Group.Category.GROUND, groupData) end test(); So now it's spawning in the correct location, but why can't I use the lat/long coordinates that I read from the F10 map? See where it spawned: EDIT: and yes, my mouse pointer is positioned directly above the unit
  5. Hi, I want to make a multiplayer mission where the players will get intel on enemy ground units. Ideally, some players would take the role as tactical commanders, and instruct the other players accordingly. But I want to have some sort of "automatic" tasking, or just some way of notifying players of enemy targets. What would you suggest is a nice way to do this in a mission? I know a bit of scripting, so I was planning maybe adding some option where players can request position of nearest enemy target. The response would be heading and distance from bullseye. Maybe there already is such functions in place. What do you think? Thanks
  6. Tried this code, but I the LAV spawned somewhere faaaaar out north west local coordinate = coord.LLtoLO(42.13982, 42.39503) local lat, long, alt = coord.LOtoLL(coordinate) local msg = lat .. ", " .. long .. "\n" .. coordinate.x .. ", " .. coordinate.y .. ", " .. coordinate.z trigger.action.outText(msg, 10) local groupData = { ["visible"] = false, ["taskSelected"] = true, ["route"] = { }, -- end of ["route"] ["groupId"] = 2, ["tasks"] = { }, -- end of ["tasks"] ["hidden"] = false, ["units"] = { [1] = { ["type"] = "LAV-25", ["transportable"] = { ["randomTransportable"] = false, }, -- end of ["transportable"] ["x"] = coordinate.x, ["y"] = coordinate.y, ["z"] = coordinate.z, ["unitId"] = 2, ["skill"] = "Excellent", ["name"] = "Ground Unit1", ["playerCanDrive"] = true, ["heading"] = 0.28605144170571, }, -- end of [1] }, -- end of ["units"] ["x"] = coordinate.x, ["y"] = coordinate.y, ["z"] = coordinate.z, ["name"] = "Ground Group", ["start_time"] = 0, ["task"] = "Ground Nothing", } -- end of [1] coalition.addGroup(country.id.USA, Group.Category.GROUND, groupData) EDIT: This is where it is spawning:
  7. Hi The title says it all. The "addGroup" function (http://wiki.hoggit.us/view/DCS_func_addGroup) takes "X" and "Y" to position the unit I'm tring to add. The problem is that I know I want it to spawn at N42 13.620 E42 39.518. So how do I convert these coordinates to X/Y? Cheers from Norway
  8. Thanks for your answer, I've restored the in cockpit view by "Verify integrityof game cache" option in Steam. I'm gonna try to re-install helios and see if the displays disappear again. I'm 100% sure it happened when I ran the Helios setup initially, but it might have been a coincidence.
  9. Hey, Installed Capt. Zeen's KA-50 Helios profile, but now the UV-26 and PVI-800 are disabled in my DCS in-game cockpit view. I'm aware of how to disable the MFCD's to only view them externally but this is obviously some other settings/tweaks that Helios did when I pressed setup. Can someone help me?
  10. Hi all, Installed the profile and it seems to be working great! However, I see that my UV-26is not showing in DCS anymore. Only the exported view of it is showing, but not "the original": I don't want it to disappear from the game view, even though I use helios to view it... Can someone help me with this?
  11. Sorry, I didn't mean sound disrespectful. Got a little frustrated. I'm sincerely grateful for your awesome work on these profiles! :) Used a lot of time yesterday before I realized I was trying to fit the 10:9 profile on my 16:9 monitor :doh: But anyways, let me clarify what I mean by "width or height of the total width/height": For instance, you have set the parameters of the right "MFCD" of the KA-50 like this --ABRIS RIGHT_MFCD = { x = 2237; y = 0; width = 489; height = 708; } Knowing (or, assuming) you use a 1280*1024 monitor to the left and a 1440*900 monitor to the right, I change the parameters to. --ABRIS RIGHT_MFCD = { x = (2237 - 1280) / 1440 * SecondMonitor.width + SecondMonitor.x; y = 0 + SecondMonitor.y; width = 489 / 1440 * SecondMonitor.width; height = 708 / 900 * SecondMonitor.height; } I define my "SecondMonitor" like this: -- Specify your second monitor here to align the viewports correctly SecondMonitor = { x = 0; y = 1080; width = 1920; height = 1080; } What I'm trying to demonstrate here is that the user of this monitor setup file will only have to change the "SecondMonitor" definition, then all the viewports will be aligned correctly to his/her monitor (programmatically, without having to specify all the parameters manually). So instead of configuring ALL the parameters, it will only be the four "SecondMonitor" values. I think you get the idea. I think this might save a lot of time for the users of your profiles, at least it will for me :music_whistling: If anybody's interested, I will post my monitor setup for the KA-50 later today. EDIT: On second thought, I think I'll post the monitor setup file here instead
  12. Capt Zeen, you are awesome. But you HAVE to stop hardcoding the monitor coordinates, man! Please! Set the position of MFCD's or whatever to be at some width or height of the total width/height. Having to and work out your resolution and then convert the coordinates to my monitor is a pain in the ass tbh.
×
×
  • Create New...