Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
I think that's what he wants. But you don't really need two unit groups for that
(what people say is that creating unit group is a heavy process, so the less usage of "pick every unit"/"set group = ..." in trigger, the better)
Code:
Set loc = *whatever is supposed to be center of the circle*
Custom script: set bj_wantDestroyGroup = true
Unit Group - Pick every unit in max range of loc where (matching unit) is bla bla
Loop
Set u = picked unit
Set loc2 = position of u
If
Math - Distance between loc and loc2 greater than or equal to "your desired min range"
Then
Unit is around circle line
Else
Unit is somewhere else
Custom script: call RemoveLocation(udg_loc2)
Custom script: call RemoveLocation(udg_loc)
You cannot have "circle line" damage completely, because unit may stand like 3 pixels away from line, which in game would seem as he stands directly on the line, while in calculations he would not.
Because of that you need to have "max range" and "min range"... "max range" is the circle line, while "min range" is the maximum possible offset off "max range".
I think that's what he wants. But you don't really need two unit groups for that
(what people say is that creating unit group is a heavy process, so the less usage of "pick every unit"/"set group = ..." in trigger, the better)
Code:
Set loc = *whatever is supposed to be center of the circle*
Custom script: set bj_wantDestroyGroup = true
Unit Group - Pick every unit in max range of loc where (matching unit) is bla bla
Loop
Set u = picked unit
Set loc2 = position of u
If
Math - Distance between loc and loc2 greater than or equal to "your desired min range"
Then
Unit is around circle line
Else
Unit is somewhere else
Custom script: call RemoveLocation(udg_loc2)
Custom script: call RemoveLocation(udg_loc)
You cannot have "circle line" damage completely, because unit may stand like 3 pixels away from line, which in game would seem as he stands directly on the line, while in calculations he would not.
Because of that you need to have "max range" and "min range"... "max range" is the circle line, while "min range" is the maximum possible offset off "max range".
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.