How can I cast from a widget to a non-NPC character?

This is more than enough information, Nachtmahr, thank you! This solves even more issues for me than just this.