I have the following method which contains a ForGroup call for the group 'enemies'...
...in the callback function i would like to refer to the group 'enemies' (i marked it within the following method with [HERE])...
Is there a way to refer to that group 'enemies'?
Thanks for any answers!
whisp
JASS:
public method execute takes nothing returns nothing
local group enemies = CreateGroup()
call GroupEnumUnitsInRange(enemies, GetUnitX(this.ofTarget), GetUnitY(this.ofTarget), this.range, Condition(function s_task_eval_situation.cb_is_enemy))
call SetStructA(enemies, this)
call ForGroup(enemies, function s_task_eval_situation.cb_add_to_enemiesInRange)
call GetStructA(enemies, true)
call this.ts.execute_next()
endmethod
...in the callback function i would like to refer to the group 'enemies' (i marked it within the following method with [HERE])...
JASS:
static method cb_add_to_enemiesInRange takes nothing returns nothing
local unit pickedUnit = GetEnumUnit()
local s_task_eval_situation t = GetStructA([HERE], false)
set t.enemiesInRange[t.eirIdx] = pickedUnit
set t.eirIdx = t.eirIdx + 1
endmethod
Is there a way to refer to that group 'enemies'?
Thanks for any answers!
whisp