When you add scripts to TimeLiner tasks, the script events are ignored, and the script actions are run regardless of the events.
Using scripts enables you to control how the animation will play (forwards, backwards, a segment at a time and so on). You can also use scripts to change the camera viewpoints for individual tasks, or play several animations at the same time.