No, that doesn't quite work unless you can check the current actors in the party. So if actor 1 has one slot empty and actor 2 has 2 slots empty, and there are only two actors in the party, the total available inventory slots would be three. If there are four different items in a chest, how would this work? How would I do it so there is still that last item in the chest?
The best I can come up with would be something like this:
a=0
if actor 1 is in the party
a+= $game_party.type_number(1)
if actor 2 is in the party
a+= $game_party.type_number(2)
if actor 3 is in the party
a+= $game_party.type_number(3)
this would repeat for however many actors there are
then I would use 'a' to determine if all the items would fit in the party's inventory.
Also, this wouldn't work for gaining items after battles, would it? This would go in every event that items are gained like a chest.
Any idea what would work best?