Snippet Simple Item Stacking in GUI

The_Reaping

Member
Reaction score
2
Here's a simple way for item stacking, doesn't work for full inventory I don't think. Haven't tried it for that yet. Fully GUI

Trigger:
  • Item Stacking
    • Events
      • Unit - A unit Sells an item (from shop)
    • Conditions
      • (Item-class of (Sold Item)) Equal to Purchasable
    • Actions
      • For each (Integer B) from 1 to 6, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of (Item carried by (Buying unit) in slot (Integer B))) Equal to (Item-type of (Sold Item))
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Charges remaining in (Item carried by (Buying unit) of type (Item-type of (Item carried by (Buying unit) in slot (Integer B))))) Greater than 0
                • Then - Actions
                  • Item - Set charges remaining in (Item carried by (Buying unit) in slot (Integer B)) to ((Charges remaining in (Item carried by (Buying unit) in slot (Integer B))) + (Charges remaining in (Sold Item)))
                  • Item - Remove (Sold Item)
                • Else - Actions
            • Else - Actions
 

tooltiperror

Super Moderator
Reaction score
231
1) Untested
2) Doesn't work for full inventory
3) No demo map
4) Uses "sells an item"
5) ???

I vote for graveyard.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top