[Solved] AoE range and Group Leaks

Status
Not open for further replies.
Level 6
Joined
Jul 23, 2018
Messages
243
When you are adjusting AoE range, are you adjusting the diameter or the radius of the AoE?
Another one is that when you do
  • Custom script: set bj_wantDestroyGroup = true
and set it after the group usage, does it still destroys the group leak?
 
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,285
and set it after the group usage, does it still destroys the group leak?
It must be set before any actions or functions are run that use that value to determine if they should automatically destroy unit groups. Such actions and functions usually reset it to false by the time they return.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,285
Can it be used for any action that involves group?
Only BJs (non-"native" functions) that have the mechanic codded into them. This is most GUI actions but I am not sure if it applies to every one.

Triggers can be converted to custom script to see the resulting JASS code they produce. The functions can then be looked up against the Warcraft III built-in script files to see how they are implemented. Functions implemented as "native" are coded by the game engine itself to provide basic functionality. Other functions such as the BJs used by GUI are standard JASS functions. Inside these functions it is possible to see how bj_wantDestroyGroup works.

Here is an example of the function that implements the pick every unit in unit group and do actions action.
JASS:
function ForGroupBJ takes group whichGroup,code callback returns nothing
    local boolean wantDestroy = bj_wantDestroyGroup
    set bj_wantDestroyGroup = false
    call ForGroup(whichGroup, callback)
    if (wantDestroy) then
        call DestroyGroup(whichGroup)
    endif
endfunction
 
Status
Not open for further replies.
Top