• 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!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Attachment effect appearing

Status
Not open for further replies.
Level 12
Joined
May 22, 2015
Messages
1,051
This might be a bug in the object editor data as well. Maybe the caster animation of the spell is set to this model - that would cause this, I think.

To test your trigger, you can swap the ability with one that you can see, just to make sure it is appearing and disappearing when it should.

The way you describe that part about "casting ANY spell" makes it sound like a problem with your ability. I think I remember someone recommending "sphere" ability to you, which is good for this kind of thing, but it also has a weird side effect where the animation dies and respawns every time the unit attacks or casts spells. This is so that the blood mage appears to be using the spheres to attack and cast spells.

However, that would mean the caster has your sphere ability, which is an entirely separate bug.
 
Level 12
Joined
May 22, 2015
Messages
1,051
Tornado aura is a good one. You can have it affect no targets so you don't see the buff anywhere. Change the animation on the ability and it will display on the unit.

Alternatively, you could manage the animation using special effects instead of abilities.
 
Level 12
Joined
May 22, 2015
Messages
1,051
What should I change the animation to? Tried a few things but still nothing display.

On the tornado aura? I should note that the buff effects don't display on the unit with the aura. Instead, you have to add the animation to the tornado aura ability. It doesn't have any animation by default, but you can compare it with any other aura and just copy the animation stuff they have there. Then just switch it to what you want instead.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,286
Set Temp_Group = (Units within 512.00 of Temp_Point matching (((((((Matching unit) is alive) Equal to True) and ((Triggering unit) Not equal to (Matching unit))) and ((Level of SDummy Inverser Magicizer for (Matching unit)) Not equal to 1)) and (((Matching unit) is A structu
This leaks a handle index due to the local declared local handle variable reference counter leak on return bug.

JASS:
function GetUnitsInRangeOfLocMatching takes real radius,location whichLocation,boolexpr filter returns group
    local group g = CreateGroup()
    call GroupEnumUnitsInRangeOfLoc(g, whichLocation, radius, filter)
    call DestroyBoolExpr(filter)
    return g
endfunction
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,286
Dr Super Good can you elaborate a bit? I don't know which specific part of that leaks and I don't really know how to use DestroyBoolExpr without converting all my triggers to Jass or custom scripts.
As I said, it leaks because of the "local declared local handle variable reference counter leak on return bug".

Basically it fails to null the local group before function return and so the groups reference counter leaks a reference to it. This means that even when you destroy the group later on, the handle index it was assigned cannot ever be recycled.

Hopefully this may be patched eventually, but until then it leaks a handle id.

The solution is something like...
JASS:
function GetUnitsInRangeOfLocMatching takes real radius,location whichLocation,boolexpr filter returns group
     // bj_randomSubGroupGroup is a global group variable and should be safe to use since its intended function leaks due to LDLHVRCL anyway
     set bj_randomSubGroupGroup = CreateGroup()
     call GroupEnumUnitsInRangeOfLoc(bj_randomSubGroupGroup, whichLocation, radius, filter)
     call DestroyBoolExpr(filter)
     return bj_randomSubGroupGroup
endfunction
 
Level 4
Joined
Jan 27, 2016
Messages
89
Would nulling the groups make it work without leaks? Is there an easier way to deal with it in GUI? Or will I have to redo all group triggers with custom scripts?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,286
Would nulling the groups make it work without leaks?
Yes, nulling the local declared local handle variable before function return will fix the leak. However since it is used as the argument for the function return this is not possible and hence you will need to use a global variable to hold it or declare an extra parameter.

Is there an easier way to deal with it in GUI?
Not that I am aware of. WC3 GUI is really bad unfortunately. Maybe if you import a custom blizzard.j file with those natives fixed in it then it might work to fix the leaks.
 
Status
Not open for further replies.
Top