For example if you've made a custom spell based on storm bolt (which is cast on a single unit) use the function Issue order targeting a unit - order YourUnit to human - Storm bolt OtherUnit. Doesn't matter if you change the name of your spell or whatever, it's the spell it's based of that counts.