Warcraft III resources & community, 2003–2006 · archived

how do i stack items?

4 posts
#1

how do i stack items?

I already tried the jass trigger on the post down below but it doesnt work i wanted to know an easy way to stack charge items
#2
events-
unit acquires an item
conditions-
item being manipulated equal to (item)
hero manipulating item has (item)
actions-
remove (item being manipulated)
set charges of (item) to (charges remaining +1)
#3

hmm

that doesnt work i need something that will only combine charge class items and will stack items that also have multiple charges if there is an item on the ground with 3 charges and you have an item with 2 charges i want the one you have to be 5 charges...
#4
I think you only need to create an Integer Variable.

:arrow: Set charges_variable = (charges remaining in item being manipulated + charges remaining in item carried by triggering unit of type X)
:arrow: Set charges remaining in item being manipulated to charges_variable.


These actions are to add the number of charges of a certain item that the hero has with the number of charges of the manipulated item.

I think is it you need. Hope that helped! :D