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

Grouping Items Together

Status
Not open for further replies.
Level 4
Joined
Sep 6, 2006
Messages
135
Hey, me again, does anybody know how to make items group together? like I buy 6 potions of healing, they all group together to get 6 potions of healing with 5 inventory slots remaining
Please help
 
Level 32
Joined
Oct 23, 2006
Messages
5,291
Rao Dao Zao said:
Item stacking is a nasty business.
The IncredibleItemStackingSystemOfDoom http://www.wc3sear.ch/viewtopic.php?t=15018provides an excellent solution.
The map includes a custom script:
set udg_Item_TempPotionCount = CountItemsOnUnit('I00M',GetManipulatingUnit()).
In order to get the trigger to work properly on my map I had to replace it with:
For each (Integer A) from 1 to 6, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Item-type of (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to Potion of Healing
Then - Actions
Set Item_TempPotionCount = (Item_TempPotionCount + 1)
Else - Actions
as specified in the tutorial.
Thanks RDZ! That thing rocks!
tmnp1.gif
 
Status
Not open for further replies.
Top