• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece!🔗 Click here to enter!

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