• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[LUA] Unable to make dynamic filters

Status
Not open for further replies.

Wrda

Spell Reviewer
Level 28
Joined
Nov 18, 2012
Messages
2,011
For some reason I can't figure out how to make a dynamic filter/condition so that it can be used for unit enumerations are stuff like that, lua always gives me a vague error "unknown compile error". I've tried endless possibilities and can't wrap my head about it...
Lua:
function A()
    local b = Condition(function AFunction()
    return IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO)
    end)
--blaaaablabla
--(...)
    GroupEnumUnitsInRange(g, someX, someY, 256., b)
end
Either the solution is simple or I'm just overcomplicating it while there is an easier way.
Would be nice to have a documentation about lua on this
 
Status
Not open for further replies.
Top