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

how do i stack items?

Status
Not open for further replies.
Level 1
Joined
Sep 27, 2005
Messages
4
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
 
Level 10
Joined
Jul 2, 2004
Messages
690
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)
 
Level 1
Joined
Sep 27, 2005
Messages
4
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...
 
Level 6
Joined
Aug 12, 2005
Messages
205
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
 
Status
Not open for further replies.
Top