generally monitored the memory consumpion in bytes for wc3. in normall, it takes memory in a special space for replay, but i used do not ssve replay. after that it shouldnt increase in space, but it did (a eakless map, does never increase in space after Donotsavereplay())
that's because every time you create a unitgroup and destroy it it will leak a little memory
you can't do much about it though
JASS functions don't create unitgroups but add all units passing a certain filter to a group instead of creating the group and then adding all the units to it
of cause you can access these enumeration functions in custom script but it might be slow in a special case
-
Custom Script: call GroupEnumUnitsInRange(udg_Group, udg_x, udg_y, udg_aoe, null)
"null" is the place for the filter function
usually you create a function in JASS which is like the following
JASS:
function filter takes nothing returns boolean
return GetUnitLife(GetFilterUnit())>0.405
endfunction
and you convert it to a filter using "Condition(function filter)" and replace the "null" with it
but you can't declare functions in GUI so you will have to use the null-filter version
actually this is damn fast (faster than anything else) if there is no unit, or only a few units which would pass the filter anyway, around but if there are MANY (50+) units within the area of effect which do NOT fullfill the given conditions it will be slower
this is because if you use a null-filter all units are added to the group and you have to check every unit in the pick-all-units-in-group-loop
checking within the condition is waaaay faster
you also could just make a few JASS filter functions and continue using them in GUI but some dumbass will mostlikely reply that if you are using JASS already you should make the whole spell with JASS and if you do it you will have to switch to vJASS because another dumbass will reply that it is much easier than JASS (which is true anyway but requires JNGP) and so it would not be GUI anymore
Hi Ive tried to add it to my map, and I dont get it work
you mostlikely forgot something
are all triggers working?
did you check if the ability codes are correct?
what about the imports?
and dummy units? (but if the slow works it's unlikely that you forgot to copy them x)