• 🏆 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!

[JASS] Unit issued item pickup order

Status
Not open for further replies.
Ok, so I'm creating a system which causes items to stack in a unit's inventory using hash tables (hash tables aren't important in this thread). Everything works fine, blablabla. But I want to make it so if the unit is issued an order to pick up an item, and his inventory is full, but he can still stack the item in his inventory, he will move towards the item and "pick it up", adding it to a stack of the items in his inventory. Everything works fine, except that it shows the error message: "Inventory is full". How to prevent this?
 
Level 7
Joined
Jul 20, 2008
Messages
377
The best way I can think of is to make another set of items such that they are like a tome, where they get used up when you pick them up instead of putting them into your inventory. Then when you acquire (or use, depending on what behavior is involved w/ tomes) that item, modify the stack for the actual items in your inventory.
 
Level 4
Joined
Feb 2, 2009
Messages
71
You can change the "Inventory is full" message using custom Game Interface. You can find it under Advanced.
Text - Message - 'Inventory is full.'
Just delete the sentence.

Now the message will stop showing.
"Duh, yeah, but I don't want to remove it completely pothead!"
No, but now you can make a system on your own for showing message.
And while doing so, add an exception for what you describe above.
 
Last edited:
The best way I can think of is to make another set of items such that they are like a tome, where they get used up when you pick them up instead of putting them into your inventory. Then when you acquire (or use, depending on what behavior is involved w/ tomes) that item, modify the stack for the actual items in your inventory.
Good idea, though it will mean creating 2 of each kind of stackable item...

You can change the "Inventory is full" message using custom Game Interface. You can find it under Advanced.
Text - Message - 'Inventory is full.'
Just delete the sentence.

Now the message will stop showing.
"Duh, yeah, but I don't want to remove it completely pothead!"
No, but now you can make a system on your own for showing message.
And while doing so, add an exception for what you describe above.
Yeah, but the error sound etc... I dunno.

Both ideas are good, I think I prefer Livirus', but I'll wait for another suggestion, and if there aren't any more, I'll use what other people think is the best way.
 
Status
Not open for further replies.
Top