How do you allow items to be stackable?

Sil3nt

SUP?
Reaction score
134
Have 2 of the same items. Then they stack.


Seriously, theres at least 75+ items in warcraft.
 

Cidzero

Imma firin mah lazer!!!1!1
Reaction score
39
Code:
Charged Items stack
    Events
        Unit - A unit Acquires an item
    Conditions
        (Item-class of (Item being manipulated)) Equal to Charged
    Actions
        For each (Integer ItemMerging) 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 being manipulated)) Equal to (Item-type of (Item carried by (Hero manipulating item) in slot ItemMerging))
                        (Item being manipulated) Not equal to (Item carried by (Hero manipulating item) in slot ItemMerging)
                    Then - Actions
                        Item - Set charges remaining in (Item carried by (Hero manipulating item) in slot ItemMerging) to ((Charges remaining in (Item carried by (Hero manipulating item) in slot ItemMerging)) + (Charges remaining in (Item being manipulated)))
                        Item - Remove (Item being manipulated)
                    Else - Actions
                        Do nothing

I got this code from this site, I forget where, but theres a tutorial on it. But here's the basice code, it'll help you figure out how to do item stacking without it A) Removing the items B) Over stacking which happened a lot to me ^_^;
 
E

EricWiens

Guest
For each (Integer ItemMerging) from 1 to 6, do (Actions)

In this line where is says 'ItemMerging' is this a custom Variable? i'm trying to follow the code exactly but am not sure what to do here.

I tried to make a variable was not sure what i was doing. End result i cannot use the variable i have made.

Would 'For each Interger A, do multipule actions' work just as well?
 

robinremue

Member
Reaction score
16
In this line where is says 'ItemMerging' is this a custom Variable? i'm trying to follow the code exactly but am not sure what to do here.

I tried to make a variable was not sure what i was doing. End result i cannot use the variable i have made.

Would 'For each Interger A, do multipule actions' work just as well?

Since it says 'Integer...' I'd say it's an integer variable =)
 
E

EricWiens

Guest
How would i create a variable that would work in this situation
Although i do not understand this is what i've tried:

Variable Name: ItemMerging
Variable Type: Integer
No array
Initial Value: 0

I'm thinking this won't work if i don't understand what i've done.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top