umm can someone tell me why this trigger won't work? It's for stacking items.
The life of item will be the max charge.
If the charge of item + item in inventory < life, add them together
If they are greater and item in inventory < life, set item in inventory to life, and subtract the difference of two from item being manipulated.
If not, do nothing.
However, it just removes the item being manipulated.
The life of item will be the max charge.
If the charge of item + item in inventory < life, add them together
If they are greater and item in inventory < life, set item in inventory to life, and subtract the difference of two from item being manipulated.
If not, do nothing.
However, it just removes the item being manipulated.
-
Stacking
-
Events
- Unit - A unit Acquires an item
-
Conditions
- (Item-class of (Item being manipulated)) Equal to Charged
-
Actions
-
For each (Integer Item_Cycle[(Player number of (Owner of (Hero manipulating item)))]) from 1 to 6, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
And - All (Conditions) are true
-
Conditions
- ((Hero manipulating item) has (Item being manipulated)) Equal to True
- (Item being manipulated) Equal to (Item carried by Hero_Type[(Player number of (Owner of (Hero manipulating item)))] in slot Item_Cycle[(Player number of (Owner of (Hero manipulating item)))])
-
Conditions
-
And - All (Conditions) are true
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Charges remaining in (Item carried by Hero_Type[(Player number of (Owner of (Hero manipulating item)))] in slot Item_Cycle[(Player number of (Owner of (Hero manipulating item)))])) + (Charges remaining in (Item being manipulated))) Less than or equal to (Integer((Current life of (Item being manipulated))))
-
Then - Actions
- Item - Set charges remaining in (Item carried by Hero_Type[(Player number of (Owner of (Hero manipulating item)))] in slot Item_Cycle[(Player number of (Owner of (Hero manipulating item)))]) to ((Charges remaining in (Item carried by Hero_Type[(Player number of (Owner of (Hero manipulating item)))] in slot Item_Cycle[(Player number of (Owner of (Hero manipulating item)))])) + (Charges remaining in (Item being manipulated)))
- Item - Remove (Item being manipulated)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Charges remaining in (Item carried by Hero_Type[(Player number of (Owner of (Hero manipulating item)))] in slot Item_Cycle[(Player number of (Owner of (Hero manipulating item)))])) Less than (Integer((Current life of (Item being manipulated))))
-
Then - Actions
- Item - Set charges remaining in (Item carried by Hero_Type[(Player number of (Owner of (Hero manipulating item)))] in slot Item_Cycle[(Player number of (Owner of (Hero manipulating item)))]) to (Integer((Current life of (Item being manipulated))))
- Item - Set charges remaining in (Item being manipulated) to ((Charges remaining in (Item being manipulated)) - ((Integer((Current life of (Item being manipulated)))) - (Charges remaining in (Item carried by Hero_Type[(Player number of (Owner of (Hero manipulating item)))] in slot Item_Cycle[(Player number of (Owner of
-
Else - Actions
- Do nothing
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Else - Actions
- Do nothing
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
For each (Integer Item_Cycle[(Player number of (Owner of (Hero manipulating item)))]) from 1 to 6, do (Actions)
-
Events
Last edited by a moderator: