Problem animating a chest

In the content browser, click the “Add New” button that is colored in green and click blueprint class and then actor. Double click it to open it up and click the “Add Component” button that is colored in green in the top left. Select skeletal mesh from the dropdown. In the details panel(usually at the right) look for the mesh section and set your skeletal mesh here.

The functionality and properties for your chest will be placed here, in this blueprint. For a short intro, click the tab labeled “Event Graph”. You’re faced with 3 red boxes. The first one is labeled “Event Begin Play” this will happen after the object is created and ready to go! Click on the arrow and drag out a line, then type ‘set timer’.

For this small sample we will create a simple opening and closing of the chest over a recurring timer. For functionName call it “OpenCloseChest”, set it’s time to 2 and turn on looping. Now you need to create the event that the timer will call after the time runs out. Right click an empty space and create a New Custom Event and label it “OpenCloseChest”

Drag the skeletal mesh component from the left and dropping it into the blueprint’s event graph.

Drag out a connection from the skeletal mesh and type out “play animation” and connect this to the “OpenCloseChest” event.

Whatever animation you want to play goes in the slot labeled “NewAnimToPlay”. You can have an advanced chest with many animations(open, close, locked, disappear, spawn, explode, etc) but for this one we will just have 2 animations for opening and closing and you can build off that.

Here is the simple setup for playing open and closed animations:

Drag and drop the blueprint into the game to test the chest animations. You can do this functionality in the Animation Blueprint or in combination with the Animation Blueprint. If the animations are able to play, you can then proceed to unlocking the chest with the player and so forth. There are plenty of examples online as well.