Create a new sprite object, let it invisible.
After the action create mage, warrior or ranger create this invisible sprite same position as mage, warrior or ranger and set a pin on it.
So, after that you will have an invisible sprite following the player, doesn't matter his class, and set the camera to this invisible sprite.