gromit190 Posted September 20, 2016 Posted September 20, 2016 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 Autonomous ground AI project
ESAc_matador Posted September 20, 2016 Posted September 20, 2016 You can use Moose to make your own script or use the one I made. It makes that every friendly ground unit report enemy situation on demand. And if theyr are close enough they can mark them with https://forums.eagle.ru/showthread.php?p=2713321
gromit190 Posted September 21, 2016 Author Posted September 21, 2016 Thanks, really nice script and a great idea! I'll have to dig into it later today. Wow, MOOSE is really immense. Autonomous ground AI project
gromit190 Posted September 21, 2016 Author Posted September 21, 2016 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 Autonomous ground AI project
Stonehouse Posted September 22, 2016 Posted September 22, 2016 There is a mist.getUnitsInZones. Basically you pass it a table of unit names and a table of zone names and an optional zone type and it returns a table of the units from the unit name table passed in that are in any of the named zones.
gromit190 Posted September 22, 2016 Author Posted September 22, 2016 Whoops, was not supposed to post that here. Made a separate thread about this. But thanks! Autonomous ground AI project
Stonehouse Posted September 22, 2016 Posted September 22, 2016 lol I did wonder, it was kind of like the thread took a hard right and headed off into the wilderness hehe
gromit190 Posted September 22, 2016 Author Posted September 22, 2016 lol I did wonder, it was kind of like the thread took a hard right and headed off into the wilderness hehe Lol, sorry about that :music_whistling: Hehe. (Back on topic) A friend of mine suggested I make a "killbox" system. So a player can request and receive a area of where to kill all enemy units. So it means I would search for the enemy closest to the player, then give the grid where that enemy is located. Thoughts? Autonomous ground AI project
Stonehouse Posted September 22, 2016 Posted September 22, 2016 ok possibly look at mist.getUnitsInMovingZones where you can specify a zone based on a unit's position (the player in this case) with the radius of the zone being passed to the mist function to define the distance to search for enemies and again pass it a table of unit names to check to see if they are in the zone (ground units this time). The function again returns a table of units and you could then determine the closest and then send a message to the player giving the grid using the co-ords of the closest ground unit (which you had to work out to find out the distance). There would be other ways too. I assume you meant ground units since you are talking about kill boxes.
ESAc_matador Posted September 22, 2016 Posted September 22, 2016 I mentioned to you the script c4SIR does that.
gromit190 Posted September 23, 2016 Author Posted September 23, 2016 I mentioned to you the script c4SIR does that. I'm using your script matador, but I'm also a bit eager to learn how to do these things myself. Also I probably won't be using lat/long coordinates like you do in your script. I'm thinking I'll use MGRS grids and heading/distance from bullseye. For the killbox system, MGRS grids will be used for sure. Autonomous ground AI project
ESAc_matador Posted September 23, 2016 Posted September 23, 2016 You can change that. Check for the mist.getLLString and change it for MGRS.
Recommended Posts