The first thing to do is to create a chest event on the map. Give it a name, say "Chest 1". This will have 2 pages, the first to obtain the contents and the second to make sure the chest is empty afterwards.
Page 1
This is the first time the chest is opened, where the contents of the chest are obtained.
Set the "Event Graphic" to a closed chest (there are 2 RTP in "object1"), making sure that Movement Type is set to "Stationary", Trigger Condition is "Action Key" and Event Layer is "Same Layer As Hero".
In the Event Commands, place the following:
<>Play Sound: open1
<>Face Event: This Event, Face Right
<>Wait: 0.2 Sec
<>Face Event: This Event, Face Up
<>Wait: 0.2 Sec
<>Face Event: This Event, Face Left
<>Wait: 0.2 Sec
<>Face Event: This Event, Face Right
<>Wait: 0.2 Sec
<>Face Event: This Event, Face Up
<>Wait: 0.2 Sec
<>Face Event: This Event, Face Left
<>Wait: 0.2 Sec
What this does is "animate" the chest opening. Many online chest tutorials place the "animation" movement in a single "Move Event" sequence, which, in my opinion, is ineffectual. Having individual commands like this provides a much more effective method of animation.
Next, we need to fill the chest with goodies! So, after the above sequence, for this tutorial we'll gift the player 5 Potions, thus:
<>Message: 5 Potions received!
<>Change Items: Potion 5 Add
<>Switch Operation: [0001: Chest 1 Opened] ON
<>Change Items: Potion 5 Add
<>Switch Operation: [0001: Chest 1 Opened] ON
The final Switch command is to make sure that the chest is empty after the potions are grabbed.
Page 2
This is to make sure the chest is (and remains) empty after its contents have been obtained.
In "Preconditions", make sure the "Chest 1 Opened" switch is ON.
Then set the "Event Graphic" to wide open (Facing is "Left"). Animation Type must be set to "Fixed Graphic".
And finally, in the Event Commands, place a message stating the chest is empty, thus:
<>Message: The chest is empty.
Now, when you playtest it, the chest will slowly open, you will obtain its contents, and it will remain open but empty.
We can now move onto Chapter 2: Locked Chests.