I am trying to start a "countdown timer" when I see a particular line of text. This works well, but then I need to update the timer when I receive another line of text. Example:
1) I see the substring "You turn into a vampire." and start a countdown from 30 to 0.
2) I see the substring "The moon is full." and now I want to delete the previous countdown timer and start a new one counting down from 25. I am doing this in the same spot where the previous one was being drawn, so it must be removed.
I am currently doing 1), but not 2) as all my approaches fail, since I don't know how to keep track of the variable "id" between calls to the trigger. The input is specified on line 0 and line 1, so I will be checking something like: if line == "The moon is full" then <remove the old timer and start a new one> end.