- Joined
- Jan 7, 2005
- Messages
- 7,550
There have been several occasions where GroupEnum functions do nothing.
For example, I was trying to do pick every unit in a radius, and then send them to another location (set by coordinates). Anyway, that matters little.
[JASS=The scripting is based around this]function ScriptExample takes nothing returns nothing
local group groupname = CreateGroup()
call GroupEnumUnitsInRange(groupname, X, Y, radius, Condition(function ThatContainsUnitTypeChecks))
call ForGroup(groupname, function actions)
call DestroyGroup(groupname)
set groupname = null
endfunction[/code]
What is wrong with this? Do the ForGroup or DestroyGroup natives work too fast for GroupEnum?
EDIT: By the way I hope I don't need to say "Don't be afraid to answer?"
~Thanks for your time
For example, I was trying to do pick every unit in a radius, and then send them to another location (set by coordinates). Anyway, that matters little.
[JASS=The scripting is based around this]function ScriptExample takes nothing returns nothing
local group groupname = CreateGroup()
call GroupEnumUnitsInRange(groupname, X, Y, radius, Condition(function ThatContainsUnitTypeChecks))
call ForGroup(groupname, function actions)
call DestroyGroup(groupname)
set groupname = null
endfunction[/code]
What is wrong with this? Do the ForGroup or DestroyGroup natives work too fast for GroupEnum?
EDIT: By the way I hope I don't need to say "Don't be afraid to answer?"
~Thanks for your time