• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Item stacking in the inventory

Status
Not open for further replies.
Level 4
Joined
Mar 12, 2008
Messages
83
Is it possible for item to stack in inventory in groups of 10 without trigger use? Like cooked meat in Island Troll Tribes? I made item and its charges are 10, then when item drops from animal trigger changes its charges to 1. But when hero picks up two items with 1 charges it dont stack to one item with 2 charges he just jas 2 items with 1 charge :/.
 
It is impossible to stack two items together without triggers. It is also impossible to add charges to an item without triggers.
 
Its pretty easy do with triggers:

  • Stack
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • ((Triggering unit) has an item of type (Item-type of (Item being manipulated))) Equal to True
      • (Item being manipulated) Not equal to (Item carried by (Hero manipulating item) of type (Item-type of (Item being manipulated)))
    • Actions
      • Item - Set charges remaining in (Item carried by (Hero manipulating item) of type (Item-type of (Item being manipulated))) to ((Charges remaining in (Item carried by (Hero manipulating item) of type (Item-type of (Item being manipulated)))) + (Charges remaining in (Item being manipulated)))
      • Hero - Drop (Item being manipulated) from (Hero manipulating item)
      • Item - Remove (Item being manipulated)
 
Thanks it works nicely. But i have another problem. I want the items to stack, lets say at 10 max. I tried to make condition that to stack charges of item in hero + charges of item on ground must be equal or lower 10. And when i pick up items they stack and 10 and then when i pick another item it dont stack, but when i pick next item it dont stack too! Like the trigger refers always to the first stack which is 10. :(
 
Status
Not open for further replies.
Back
Top