[JASS] native UnitRemoveAbility: can be very buggy?

Level 29
Joined
Oct 24, 2012
Messages
6,545
the only bug occurs when adding an ability to a unit because u cant lvl that ability with skill points. for the remove ability one tho i have never seen any bugs with it.

if u are checking the lvl of an ability and it returns 0 that is because null is 0. That being said when anything bugs it returns 0 not a random integer. So if u check for the ability lvl of a unit and the unit doesnt have it it will return 0. just like trying to create a unit at a point variable that hasnt been set, that unit goes to center of map because that point is 0,0

what i'm trying to say is, if you remove a skill via the native, that a unit was given through the object editor - the skill basically becomes unlearned; any skill points you used on learning that skill becomes wasted

u could trigger this by checking the units ability lvl then adding skill points equal to that ability lvl.
 
Level 7
Joined
Feb 3, 2013
Messages
277
it just causes problems, cause one of the skills that i'm making requires a differnt skill to be added after its initial use

like inbetween usage, if a character levels you can see the skill you previously leveled, UNlevled and it kinda just pops a wtf feeling in your head
 
Level 5
Joined
May 6, 2013
Messages
125
Wasn't that what engineering upgrade is there for? I think it replaced a spell and made you able to skill on the new one with regular skill points. Give the replaced ability the same research icon and description and nobody will notice. (Correct me if im wrong, i never actually needed this)
 
Level 7
Joined
Feb 3, 2013
Messages
277
Wasn't that what engineering upgrade is there for? I think it replaced a spell and made you able to skill on the new one with regular skill points. Give the replaced ability the same research icon and description and nobody will notice. (Correct me if im wrong, i never actually needed this)

what i did was make an attribute skill, that does nothing, and set hideicon:TRUE - just for the learn skill. and it works fine

still thanks for the response,i'll try it out later
 
Top