- Joined
- Jan 12, 2011
- Messages
- 110
Hello,
as the title says, this is mine Item-Stacking system.
I have searched for many and many systems, but all were not efficient as I wanted, or they were too much complicated, with many variables, that are not needed.
So I decided to create my own system, that will be pretty easy and even efficient.
This system works even if your inventory is full !!!
1. What do we have to do, before making the trigger itself ?
Ok, first, we need some item, you want to stack.
- I'll use mine custom item called Minor Healing Potion
2. Creating the trigger
Let's start.
1) As you see at the picture, Set event to: Event - Generic Unit Event (A unit Is issued an order targeting an object)
2) Create Or - Any (Multiple) Conditions are true, so you can add more items to this system and it will still work for any item that is here
3) Under Actions create If/Then/Else Multiple Action
Conditions
- 1st Item Comparison
- 2nd Boolean Comparison
- 3rd Boolean Comparison
- 4th Boolean Comparison
Then actions
-Well, the first one is pretty long, so here is the picture of whole action:
-and then just simple Item Remove action where you remove that targeted item.
Else actions
- leave blank
How does it work:
1. Unit targets some object - if its any object of object we specified (ex. Minor Healing Potion), it will start an action
2. It checks, if we have item of that targeted object, if no, then A, if yes theb B
A- The Unit will just normally pick up the item
B- If the unit has the same item as is targeted object, and is in range of 250 of that object, it will add one more charge to that item and removes the targeted item.
Don't say its not simple enough.
Pros:
Easy GUI
Efficient
You can have full inventory and it will still stack
Cons:
If you have that item and its going to stack, the hero will move at the position of that item - I didn't figured how to stop him from doing that
If you find any mistakes in the system, please, reply it and share with others
Thanks
Demo map with stacking trigger:
as the title says, this is mine Item-Stacking system.
I have searched for many and many systems, but all were not efficient as I wanted, or they were too much complicated, with many variables, that are not needed.
So I decided to create my own system, that will be pretty easy and even efficient.
This system works even if your inventory is full !!!
1. What do we have to do, before making the trigger itself ?
Ok, first, we need some item, you want to stack.
- I'll use mine custom item called Minor Healing Potion
2. Creating the trigger

Let's start.
1) As you see at the picture, Set event to: Event - Generic Unit Event (A unit Is issued an order targeting an object)
2) Create Or - Any (Multiple) Conditions are true, so you can add more items to this system and it will still work for any item that is here
3) Under Actions create If/Then/Else Multiple Action
Conditions
- 1st Item Comparison
- 2nd Boolean Comparison
- 3rd Boolean Comparison
- 4th Boolean Comparison
Then actions
-Well, the first one is pretty long, so here is the picture of whole action:

-and then just simple Item Remove action where you remove that targeted item.
Else actions
- leave blank
How does it work:
1. Unit targets some object - if its any object of object we specified (ex. Minor Healing Potion), it will start an action
2. It checks, if we have item of that targeted object, if no, then A, if yes theb B
A- The Unit will just normally pick up the item
B- If the unit has the same item as is targeted object, and is in range of 250 of that object, it will add one more charge to that item and removes the targeted item.
Don't say its not simple enough.

Pros:
Easy GUI
Efficient
You can have full inventory and it will still stack
Cons:
If you have that item and its going to stack, the hero will move at the position of that item - I didn't figured how to stop him from doing that
If you find any mistakes in the system, please, reply it and share with others
Thanks
Demo map with stacking trigger: