Activating animation from behavior

I was wondering if there is a way to activate an animation from a behavior. I want to have a lot of different types of objects that can have their destroying animation player when clicked on, but you don’t seem to be able to activate animations from a behavior, do I just have to copy paste code in the events sheet or is there a way to do this with behaviors?

You could have a behaviour that sets the animation depending on what that objects variable is. Then just set the behaviour to the object and change the variable when you need too.

Basic example (make sure the Behaviour Properties is set to sprite)

Then call the change somewhere in your code