ROBBYDOBBY
New Member
- Reaction score
- 3
Hey,
I've tried making a simple bag system in which you swap between two inventories. I've made it so at the start of the game you get the item 'Swap to Bag 2'. When you use that it saves all the items from slot's 2-6 and removes the Swap to Bag 2 item. This is replaced by Swap to Bag 1. When you use swap to bag 1 the items do not appear ><. any ideas?
and i haven't made it load the items on bag 2 yet.
Bag_Inv_1 is an item variable with an array the size of 5
Bag_inv_2 Is the same.
I've tried making a simple bag system in which you swap between two inventories. I've made it so at the start of the game you get the item 'Swap to Bag 2'. When you use that it saves all the items from slot's 2-6 and removes the Swap to Bag 2 item. This is replaced by Swap to Bag 1. When you use swap to bag 1 the items do not appear ><. any ideas?
and i haven't made it load the items on bag 2 yet.
Code:
Extension1
Events
Unit - A unit Uses an item
Conditions
(Item-type of (Item being manipulated)) Equal to Switch to Bag 2
Actions
Set Bag_Inv_1[1] = (Item carried by (Triggering unit) in slot 6)
Set Bag_Inv_1[2] = (Item carried by (Triggering unit) in slot 2)
Set Bag_Inv_1[3] = (Item carried by (Triggering unit) in slot 3)
Set Bag_Inv_1[4] = (Item carried by (Triggering unit) in slot 4)
Set Bag_Inv_1[5] = (Item carried by (Triggering unit) in slot 5)
Item - Remove Bag_Inv_1[1]
Item - Remove Bag_Inv_1[2]
Item - Remove Bag_Inv_1[3]
Item - Remove Bag_Inv_1[4]
Item - Remove Bag_Inv_1[5]
Item - Remove (Item being manipulated)
Hero - Create Switch to Bag 1 and give it to (Triggering unit)
Code:
Extension2
Events
Unit - A unit Uses an item
Conditions
(Item-type of (Item being manipulated)) Equal to Switch to Bag 1
Actions
Set Bag_Inv_2[1] = (Item carried by (Triggering unit) in slot 6)
Set Bag_Inv_2[2] = (Item carried by (Triggering unit) in slot 2)
Set Bag_Inv_2[3] = (Item carried by (Triggering unit) in slot 3)
Set Bag_Inv_2[4] = (Item carried by (Triggering unit) in slot 4)
Set Bag_Inv_2[5] = (Item carried by (Triggering unit) in slot 5)
Item - Remove Bag_Inv_2[1]
Item - Remove Bag_Inv_2[2]
Item - Remove Bag_Inv_2[3]
Item - Remove Bag_Inv_2[4]
Item - Remove Bag_Inv_2[5]
Hero - Create (Item-type of Bag_Inv_1[1]) and give it to (Hero manipulating item)
Hero - Create (Item-type of Bag_Inv_1[2]) and give it to (Hero manipulating item)
Hero - Create (Item-type of Bag_Inv_1[3]) and give it to (Hero manipulating item)
Hero - Create (Item-type of Bag_Inv_1[4]) and give it to (Hero manipulating item)
Hero - Create (Item-type of Bag_Inv_1[5]) and give it to (Hero manipulating item)
Item - Remove (Item being manipulated)
Hero - Create Switch to Bag 2 and give it to (Triggering unit)
Bag_inv_2 Is the same.