When I use FindSubstance, a successful return array always has just one itemref in it.
From my reading of the documentation, shouldn't it be returning an array of all found itemrefs in the container that equals or exceeds the amount you specify. Or is that just my wrong reading of it? I don't see why it would be returning an array if it stops looking after it finds the first match.
FindSubstance array
Moderator: POL Developer
Sometimes my ingredients in crafting are non-stackable items that can have cprops or colours depending on their use in the game. I don't want to use an ingredient in crafting if it is marked for some other use.
FindSubstance has no way to find a match except by starting container, objtype and amount.
If I'd known of the a while ago I would have coded items differently!
FindSubstance has no way to find a match except by starting container, objtype and amount.
If I'd known of the a while ago I would have coded items differently!