Im trying to create a weight limit to the inventory.
One way to do it I thought would be to add 2 global variables one is weight, the other is weight limit, weight limit can be levelled and the weight represents your current weight, which I want to manipulate by an array. I don't know how to make a condition to get value y for each spot in the array to be weight. Say I have wood in my inventory and each piece of wood is 5lbs. So y in the array is the amount of a particular item if thats 4 you will have added 20lbs to your weight. here is a concept I cant seem to figure out-
if array contains x(ID of the object)
addto Weight: InventoryArray(X, see condition) *(multiplied) corisponding y index?