View Single Post
Old 09-21-2011, 02:52 AM   #6
Yrth
User
 
Yrth's Avatar
 
Join Date: Jul 2010
Posts: 76

Yrth has little to show at this moment (4)

Default

Quote:
or the GroupEnum call, it's more efficient to just do everything in the enum callback and never add the units to the group in the first place
could you please show me what you mean?
not like something elaborate, just a short example... with a comment or two

Quote:
As you guessed, attaching structs to timers is the way to go.
so to attach a struct I literally just do
Collapse JASS:
call SetTimerData(t, myStruct)
and then to call a method for that struct all I'd need to do is
Collapse JASS:
call GetTimerData(t).methodName

Quote:
or you could use a FirstOfGroup loop instead of ForGroup
I'm guessing to do this I'd enumerate all the units into the group and then do a loop calling the function for the first of group and then removing the first from the group.
Could I do:
Collapse JASS:
exitwhen FirstOfGroup(g) == null
or would I have to use:
Collapse JASS:
exitwhen IsUnitGroupEmpty(g)
Yrth is offline   Reply With Quote