Honestly, I wouldn't recommend to fire an event out of an template as the point in time when the template will be executed and the number of executions can differ depending on the exact content of the template and on the object use (interactive in an UI, template triggered by a normal property change in a script, using property bags, ...).
It would be helpful if you describe what you are trying to achieve. It could be the table scripts are what you are looking for.
Honestly, I wouldn't recommend to fire an event out of an template as the point in time when the template will be executed and the number of executions can differ depending on the exact content of the template and on the object use (interactive in an UI, template triggered by a normal property change in a script, using property bags, ...).
It would be helpful if you describe what you are trying to achieve. It could be the table scripts are what you are looking for.