Attaching scripts to the player is considered bad form since only one mod can be allowed to do so.
SetScript is still officially considered beta until 0019 is released, though assuming there's no script already attached to the player when you call it you should have no problems.
However with 0019 you'll be able to register a function script to handle the OnHit/OnMagicEffectHit events without having to attach a script to the player so that will probably be a better option, at least for compatibility's sake.
Oh, I see why. I always wondered what the deal was with that being not kosher.
I guess using setscript until 0019 comes out is the only way I am going to get OnHit/OnMagicEffectHit for now. Is that a planned feature? Is it kosher to let people know there may be an issue with other mods that may use setscript on the player? Then update for 0019? It is a feature I really want for tracking things that affect the player. I guess what I can do is check for an existing script and if there is one don't do use that functionality. Maybe a big warning that says, "Another mod is setting a script on the player. You are going to lose gameplay features from this mod."
Anyway, sounds really cool with the handler.
Another way this could be handled though is this:
1. setscript a function that allows OBSE Functions to be added to an array that is called from OnHit/OnMagicEffectHit2. each mod adds their Function to the list of called functions
Yes, this would have to be coordinated between mods for compatibility, but COBL would be the place to do this, right?
BTW, calling OBSE Functions by reference is such a great feature. I use it for a ton of different cool things. I used it to build a parser that can be extended by other mods. Keep up the great work!