I have a problem with a piece of code to return flags in BG's. The original code was without a range check, resulting in some weird behavior once you started to get into 40 yards or so range of any flag. I am trying to add a melee range check but I am failing. This is what I have now:
Tried several thing but I cannot make it work. Right now like this, it is doing nothingCode:local flag = { "Alliance Flag", "Horde Flag", "Netherstorm Flag" } for _,v in ipairs(flag) do if CheckInteractDistance (v, 3) then InteractUnit(v) end endI hope someone can tell me what I am ****ing up here.