Give the ability a Buff effect (Stormbolt uses a stun buff for example) and use a rapidly firing period trigger (say, every 0.03 seconds) to check for units with that buff and run the actions from there. To avoid it running more than once, add the picked unit to a unit group, and don't run the actions if the unit's already in the said group. You can then remove the buff immediatly after, and remove the unit from the group, allowing it to be retargetted later.
This method is about as accurate as you can get it without using a damage detection system (which can be quite cumbersome).