New native not recognized?

Status
Not open for further replies.
Level 2
Joined
Mar 31, 2012
Messages
13
Hiya!

So, i have a small question about the native BlzDeleteHeroAbility - according to the patch notes, it was added in the 1.29 patch? I'm currently using version 1.30.4, but can't seem to get it to work, and the error message isn't suggesting any similar functions. I also tried to see if maybe it was integrated into the normal UnitRemoveAbility native, but no luck, it still can't remove Hero abilities.

Was this native removed, or does it go by a different name now, or did i imagine the whole thing? It isn't strictly necessary for what i'm trying to accomplish but it sure would be convenient!

Thanks in advance for any information!
 

Chaosy

Tutorial Reviewer
Level 41
Joined
Jun 9, 2011
Messages
13,239
I had a similar problem in Wurst with multiple natives.
My solution was to manually add it into.. whatever the .j file is that contains all the functions.

This is not available if you use the standard editor though.

So my second best guess is to declare the native at the top of a jass trigger, maybe it works in the map header (not tried)
I remember doing something similar to this, but I cannot recall which native it was.
 
Level 19
Joined
Jan 1, 2018
Messages
739
This native was added in 1.29 and removed again in 1.30, from common.j at least, never tried if you can still use it if you add it similar to natives like UnitAlive.
link

EDIT: It still exists in 1.31+ if you use lua: link
 
Last edited:
Level 2
Joined
Mar 31, 2012
Messages
13
Thank you! I didn't know you could declare natives like UnitAlive in this way, i've just been adding my own function that returns not IsUnitType(u, UNIT_TYPE_DEAD) and u != null for all these years (✿◠ᗜ◠) Is there a list of these hidden native somewhere?

Also, i tested declaring BlzDeleteHeroAbility, and the script recognizes it, but from what i can tell it's effect is identical to UnitRemoveAbility - it doesn't remove the ability from the Hero completely, it just resets its learned level back to zero.
 
Last edited:
Level 19
Joined
Jan 1, 2018
Messages
739
UnitAlive can be found in common.ai, and there's the thread I linked earlier (which was tested on 1.31). I'm not aware of any other hidden natives.
 
Status
Not open for further replies.
Top