• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[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