- Joined
- Nov 17, 2010
- Messages
- 6,832
- Solutions
- 586
- Reaction score
- 5,414
0.3.7
I know how to find if an item is on a tile, but how can I count how many of an item are on a tile, no matter how many and/or what stackpos they are in?
I've used a couple things in the past, but they are very specific in their requirements.. such as
This will find items on the position, and count them, but only if the item is stackable.
If I add .uid to the end, it will find non-stackable items.
And of course if there is non-stackable and stackable items together, then it usually will just error instead of doing anything.
And this function doesn't give the count back to me, it only allows you to check if the specified amount is ==/</>
Does anyone have a custom function they created to count how many of an item is on a tile?
Thanks for viewing my topic.
Cheers.
I know how to find if an item is on a tile, but how can I count how many of an item are on a tile, no matter how many and/or what stackpos they are in?
I've used a couple things in the past, but they are very specific in their requirements.. such as
Code:
getTileItemById(beetroot_pos, beetroot_id).type
If I add .uid to the end, it will find non-stackable items.
And of course if there is non-stackable and stackable items together, then it usually will just error instead of doing anything.
And this function doesn't give the count back to me, it only allows you to check if the specified amount is ==/</>
Does anyone have a custom function they created to count how many of an item is on a tile?
Thanks for viewing my topic.
Cheers.