Yep, nice catch — A local variable get reseted to its default value every tick. Making it static will make it work as if the variable was global, but retain its local scope.
Also, Zebbi, keep in mind this system is not framerate independent, I believed you should use wallclocktime instead of tickcount to increment animTick.