• 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] full inventory?

Status
Not open for further replies.
Level 4
Joined
Jul 9, 2008
Messages
88
Hello, i am currently writing a jass script for stackable items because the ones hosted here dont fit my needs. Whenever the unit has a full inventory, I still want him to walk over to the item, delete the item, and add to the charges in his inventory... But how do I check if his inventory is full. As far as I could look up from JassCraft, theres no function to return a boolean on if he has an item or not, it only checks if he has a specific or item type.
Thanks for the help.
 
Level 3
Joined
Jul 20, 2008
Messages
41
First you need to find out if the unit picking the item up already has it. (if true,:) delete the item and find the slot that has the item. Once you find the slot, set its charges to charges+1.

When you have full inv and you pick up an item you get an error message. Does the event fires even if you cant get the item?
 
Status
Not open for further replies.
Top