• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[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