- Joined
- Jul 6, 2009
- Messages
- 1,885
I wanted to make items stacking system,but single inventory slot shouldn't have more than 100 charges
I've done this far:
How to make items of type "arrows" stack up to 100 charges?
EDIT: Also,when buying item "arrows",hero gets 50 charges.
I've done this far:
-
Arrows Stack
-
Events
- Unit - A unit Acquires an item
-
Conditions
- (Item-type of (Item being manipulated)) Equal to Arrows
- ((Hero manipulating item) has an item of type (Item-type of (Item being manipulated))) Equal to True
- (Item being manipulated) Not equal to (Item carried by (Hero manipulating item) of type (Item-type of (Item being manipulated)))
-
Actions
-
For each (Integer A) 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 (Hero manipulating item) in slot (Integer A))) Equal to Arrows
- (Charges remaining in (Item carried by (Hero manipulating item) in slot (Integer A))) Less than or equal to 50
-
Then - Actions
- Item - Set charges remaining in (Item carried by (Hero manipulating item) of type (Item-type of (Item being manipulated))) to ((Charges remaining in (Item carried by (Hero manipulating item) of type (Item-type of (Item being manipulated)))) + (Charges remaining in (Item being manipulated)))
- Item - Remove (Item being manipulated)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
For each (Integer A) from 1 to 6, do (Actions)
-
Events
How to make items of type "arrows" stack up to 100 charges?
EDIT: Also,when buying item "arrows",hero gets 50 charges.