Jump to content

Dirt__

Members
  • Posts

    27
  • Joined

  • Last visited

Community Answers

  1. Dirt__'s post in Can't detect group in zone after spawning via script was marked as the answer   
    I am not sure how mist handles that function, but for the example in my last message mist was not used to find the objects. I just used the "all of coalition out of zone" trigger.

    However, I sort of managed to fix the problem using this code:
    local vehiclesInZone = {} local sphere = trigger.misc.getZone('zugdidi-5') local volS = { id = world.VolumeType.SPHERE, params = { point = sphere.point, radius = sphere.radius } } local ifFound = function(foundItem, val) vehiclesInZone[#vehiclesInZone + 1] = foundItem:getGroup():getName() return true end world.searchObjects(Object.Category.UNIT, volS, ifFound) trigger.action.outText(tableToString(vehiclesInZone), 10) For some reason this works but the "all of coalition out of zone" trigger doesn't.

    I'm not going to bother debugging this further and will continue to use this code.
    Thanks for your help!
×
×
  • Create New...