- Joined
- Jun 27, 2008
- Messages
- 2,557
This is a simple backpack system by xorkatoss. I like the system, but it is somehow buggy. One item during the game is being saved that when I open a bag, it appear there and when I close bag, it reloads previous setting even though I dropped that item. It somehow saves on both bags, I don't have any knowledge on this one.
Is there a way to fix this?
Is there a way to fix this?
-
Hashtable
-
Events
- Map initialization
- Conditions
-
Actions
- -------- This is the point where the saved items will be placed --------
- -------- Does not really matter since they will be hidden anyway --------
- Set Backpack_SavePoint = (Point(0.00, 0.00))
- Hashtable - Create a hashtable
- Set Backpack_Hashtable = (Last created hashtable)
-
Events
-
OpenBackpack
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Open Bag
-
Actions
-
For each (Integer i) from 1 to 6, do (Actions)
-
Loop - Actions
- Hashtable - Save Handle Of(Item carried by (Triggering unit) in slot i) as (Key (Triggering unit)) of i in Backpack_Hashtable
- Item - Move (Item carried by (Triggering unit) in slot i) to Backpack_SavePoint
- Item - Hide (Item carried by (Triggering unit) in slot i)
- Hero - Give (Load i of (Key (Triggering unit)) in Backpack_Hashtable) to (Triggering unit)
-
Loop - Actions
- Unit - Remove Open Bag from (Triggering unit)
- Unit - Add Close Bag to (Triggering unit)
-
For each (Integer i) from 1 to 6, do (Actions)
-
Events
-
CloseBackpack
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Close Bag
-
Actions
-
For each (Integer i) from 1 to 6, do (Actions)
-
Loop - Actions
- Hashtable - Save Handle Of(Item carried by (Triggering unit) in slot i) as i of (Key (Triggering unit)) in Backpack_Hashtable
- Item - Move (Item carried by (Triggering unit) in slot i) to Backpack_SavePoint
- Item - Hide (Item carried by (Triggering unit) in slot i)
- Hero - Give (Load (Key (Triggering unit)) of i in Backpack_Hashtable) to (Triggering unit)
-
Loop - Actions
- Unit - Remove Close Bag from (Triggering unit)
- Unit - Add Open Bag to (Triggering unit)
-
For each (Integer i) from 1 to 6, do (Actions)
-
Events