Not 100% sure if it's already capable, but SkyProc would be ideal for that.
Another way which would get you in major conflict with for example SKSE, is importing your scripts directly in the Actor script. Not recommended though, unless the mod is for personal use only.