Jump to content

Recommended Posts

Posted

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

Posted

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

Posted

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.

Posted
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?

Posted

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.

Posted
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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...