cepoimario
New member
Hello Team,
I am am trying to set an equipable item attribute in the slot that i created however i can't seems to find the correct method.
Currently i am able to modify the values from the the main gird inventory using the following but this does not seem to apply elsewhere besides the main grid
,the "Current Stack Size" attribute is getting its value from my system and updated every from for now
Further more i would like the equipped item to be removed when the "Current Stack Size" attribute is = 0 but again can't find the correct way to do so .
Thanks in advance
I am am trying to set an equipable item attribute in the slot that i created however i can't seems to find the correct method.
Currently i am able to modify the values from the the main gird inventory using the following but this does not seem to apply elsewhere besides the main grid
,the "Current Stack Size" attribute is getting its value from my system and updated every from for now
C#:
void Update()
{
var container = inventory.GetContainerWithName("AmmoPouch"); //This var is from my system
for (int i = 0; i < container.Count; i++)
{
var ss =container[i].Item.Data.itemInfo.Item.ID;
var item = InventorySystemManager.GetItem(container[i].Item.Data.itemInfo.Item.ID);
Debug.Log(item);
item.GetAttribute<Attribute<int>>("Current Stack Size").SetOverrideValue(container[i].Item.CurrentStackSize);
}
}
}
Further more i would like the equipped item to be removed when the "Current Stack Size" attribute is = 0 but again can't find the correct way to do so .
Thanks in advance