Hey @Auroraxpae!
Inside your player character BP’s Event Graph, implement this blueprint code:
This will allow us to play the corresponding animations in different interaction zones. This way, all you need to do in order to add a new animation to be played on specific areas is adding a new pair to our map, and then tagging the interaction volume.
You can create a map by first creating a new variable from the My Blueprint window on the bottom left, then navigating to the Details window on the right side while having it selected, and selecting the Map option from the dropdown menu next to the variable type dropdown menu like this:
Then select Name type for the key (left side, with the icon of squares stacked on top of each other), and Anim Montage Object Reference for the value (right side, with the icon of rectangles stacked on top of each other)
Once that’s done, you can navigate to the bottom of the same Details window and under the Default Value section, create a new pair. The name will be the tag we’re associating with the animation, and we’ll use the same name to tag different interaction volumes. Here’s an example:
And in our actor that we’re using as an interaction volume, select Self from the Components window on the top left, navigate to the Details window while having it selected, type in “tag” into the search bar, and add an actor tag with the same name like this:
About Montages
You can create an anim montage by right clicking on your animation sequence from the content browser, hover over the Create section on the menu that pops up, and hit the Create AnimMontage option. And don’t forget to have a default slot plugged into the main output pose of the Anim Graph in your anim blueprint. You can get that node by right clicking on an empty space in the anim graph, search for “default slot” on the menu that pops up, and hit the "Slot ‘DefaultSlot’ " option. Now in the Event Graph of your character blueprint, you can play the montage by either using the Play Anim Montage
or the Play Montage
node. As for the former, just select the montage from the dropdown menu on the Anim Montage pin of the node. For the latter however, make sure to plug in the SKM into the In Skeletal Mesh Component pin. You can drag the SKM from the Components window on the top left into the Event Graph.
Hope this helps! 