uhm beside of that part within the ability itself, I think it's only possible with triggers..
maybe you can work with some prepared events like units takes damage or something like that..
else you need to calculate the time, range between caster and target, spell missile's speed, etc.. and then calulate the time for it..