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

[Trigger] Item stack

Status
Not open for further replies.
Level 11
Joined
Dec 19, 2012
Messages
411
This should be ask in WEHZ since you need help from starting trigger but not fix...

  • Test
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item being manipulated) Equal to Your_Item
      • ((Triggering unit) has an item of type Your_Item) Equal to True
    • Actions
      • Item - Remove (Item being manupulated)
      • -------- I really have no idea does this variable type "item" leak.. --------
      • Set ChargedItem = (Item carried by (Triggering unit) of type Your_Item)
      • Item - Set charges remaining in ChargedItem to ((Charges remaining in ChargedItem) + 1)
 
Last edited:
^That will instantly remove your item if you pick it up the first time.

You need loop though inventory and check if unit has a item of same type AND item in InventoySlot[loopInt] is not item being manipulated.

If yes, you add the charges of item being manipulated to charges of item in InventoySlot[loopInt] and further you remove item being manipulated.

Have no time atm to make an example, and only system I found quickly is this: http://www.hiveworkshop.com/forums/.../?prev=of=updateline&search=split&d=list&r=20
 
Level 11
Joined
Dec 19, 2012
Messages
411
^That will instantly remove your item if you pick it up the first time.

You need loop though inventory and check if unit has a item of same type AND item in InventoySlot[loopInt] is not item being manipulated.

If yes, you add the charges of item being manipulated to charges of item in InventoySlot[loopInt] and further you remove item being manipulated.

Have no time atm to make an example, and only system I found quickly is this: http://www.hiveworkshop.com/forums/.../?prev=of=updateline&search=split&d=list&r=20

Oh yea :D didn't notice that.
 
Status
Not open for further replies.
Top