Is the problem that it stays 0 or that it instantly jumps to 2? Odds are your code is triggering all three events because they are in that order, try putting them in reverse order (so talked = 2, then talked = 1, then talked = 0) and see if that helps, as events run from top to bottom.