How to check amount of items within an event.

I am new to learning JS and how arrays work, how would I set up an array to run a check for items inside of a container (event), the amount of items left and when they are all gone?
I am using this system to allow the player to search the container, take what they need/want and return to it later. Once all items are removed, I have a timer to initiate the items to respawn later on.

Any help is appreciated, I am brand new to this part and I can elaborate more if needed!
This is not super straightforward - you can make an array of item IDs, but what is the UI going to be for the player to see them and selectively retrieve them?

Do you already have a plugin you're working with that provides dynamic choices functionality? That would help determine how you need to format the data and event.
This is not super straightforward - you can make an array of item IDs, but what is the UI going to be for the player to see them and selectively retrieve them?

Do you already have a plugin you're working with that provides dynamic choices functionality? That would help determine how you need to format the data and event.
I am using the PKD_MapInventory that brings up a visual inventory window and has options for visual chests/storage containers. It's not too restrictive of a plugin either, doesn't seem like it interferes with anything.
It looks like the feature for having visual chests is only in the pro level of that plugin, and most people here haven't purchased that.

There isn't information in the instructions on how to set up the events to use that interface?

You'd be best off asking the plugin author - either in the thread for that plugin or by tagging @Pheonix KageDesu.
It looks like the feature for having visual chests is only in the pro level of that plugin, and most people here haven't purchased that.

There isn't information in the instructions on how to set up the events to use that interface?

You'd be best off asking the plugin author - either in the thread for that plugin or by tagging @Pheonix KageDesu.
Unfortunately there's no info really for this in the plugin instructions. I'll try reaching out to them directly and see if they have any info!

If by chance I decide not to use this plugin anymore for the inv/chests, would using an array to run these checks still be possible, or is it just not doable at all? I'm pretty new to JS and arrays so I'm not 100% sure what is and isn't manageable lol
It just seems that you're kind of jumping to an end process without knowing how to use it or whether it's the right thing.

Just "an array" doesn't mean anything. As I said in my first reply - can you store some kind of list in an array and refer to it inside an event? Of course.

But an array isn't something the player can see and interact with, you need to construct an interface either via eventing or a plugin that presents and manipulates the information stored in the array (or whatever).

Edit: I don't know what the plugin help file looks like, but there are detailed instructions for the visual chests right on the product page where you bought the plugin.

The contents of the chest only work with the standard event commands for items/gold. And if you make it a VisualChestStored, it automatically does what you're asking. It has nothing to do with you making any arrays.
It just seems that you're kind of jumping to an end process without knowing how to use it or whether it's the right thing.

Just "an array" doesn't mean anything. As I said in my first reply - can you store some kind of list in an array and refer to it inside an event? Of course.

But an array isn't something the player can see and interact with, you need to construct an interface either via eventing or a plugin that presents and manipulates the information stored in the array (or whatever).

Edit: I don't know what the plugin help file looks like, but there are detailed instructions for the visual chests right on the product page where you bought the plugin.

The contents of the chest only work with the standard event commands for items/gold. And if you make it a VisualChestStored, it automatically does what you're asking. It has nothing to do with you making any arrays.
It does do half of what I am hoping to accomplish with it. It will display the visual with said items in it, however I'm hoping to set it up to where there will be multiple items in the chests, a check will see if all, some or none of the items remain as the player takes them as needed. Once the chest is totally empty, the event page changes to the next page, and the item respawn timer I built starts.
The issue I have currently is that you either take all or none for any of this to work, it's like i can't get it all to work together for the option I'm hoping for if that makes sense.
Ask the author - I'm sure there's a script call you can use to check whether a given stored chest has any items still in it.

You'd put that in a parallel event, and when it returns negative you start your timer.
It does do half of what I am hoping to accomplish with it. It will display the visual with said items in it, however I'm hoping to set it up to where there will be multiple items in the chests, a check will see if all, some or none of the items remain as the player takes them as needed. Once the chest is totally empty, the event page changes to the next page, and the item respawn timer I built starts.
The issue I have currently is that you either take all or none for any of this to work, it's like i can't get it all to work together for the option I'm hoping for if that makes sense.
There is no script call to check if the item is in the chest or not. I can write JS code how to do it. The variable in which things are stored in chests $gamePlayer._aaChestStorages. You can write it in consle and see how is data looks like.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-check-amount-of-items-within-an-event.165665/