• 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.

[JASS] Adding and Removing Hero Inventories...

Status
Not open for further replies.
Level 4
Joined
Jun 8, 2007
Messages
89
I'm trying to make a function that allows me to change the permanent damage of a unit, and all of it works except for two lines of code. The two lines are the ones that add and remove the hero inventory. Am I doing something that doesn't work?

JASS:
call UnitAddAbility(u, 'Ainv')

//...

call UnitRemoveAbility(u, 'Ainv')

u is the unit passed to the function. I have tried removing and/or giving the Hero Inventory to a unit to test the function and that also doesn't seem to work.
 
Level 4
Joined
Jun 8, 2007
Messages
89
Strangest thing actually, upon resaving and trying the trigger again later in the day after a reboot, the function works.
 
Status
Not open for further replies.
Top