How to implement assist mechanic similar to DoA

So I want to implement assist mechanics similar to DoA where my other character chosen will come in every X seconds and do an attack to an enemy and then despawn. Can anyone point me in the right direction?