Dig up a chest with a shovel

Hello everyone, I am  wondering if anyone knows how to make a chest that could be dug up. I already made the shovel, and the item that the chest gives you. But, I need to know how the chest will be hidden until you use the shovel, and then it shows up.
Create the quick event for the chest.  Copy the first page and paste it so you have 3 pages (the first 2 are identical).

Change the second page to be conditioned by self switch B.

Delete all the commands on the first page and change the graphic to a mound of dirt.

In the event commands, do the test to see if you have a shovel in inventory. If you do, play a digging sound and show text that you're digging up the pile of dirt.  Then turn on self switch B.

So first you'll see a pile of dirt.  If you have a shovel you can dig it up and the chest will be revealed.  After that, it's just a regular chest.

Original thread: https://forums.rpgmakerweb.com/threads/dig-up-a-chest-with-a-shovel.45302/