Question about character movement and storing variable value

Hey man, thanks for the tips, ill try them as soon as i get home o/
As for the 4 seconds, I wanted to check if my character received X amount of damage on a set period of time, and if he did, he would get stunned; Also, if the character doesn`t take any damage for some time, the counter for amount of damage that he would have to receive to be stunned would reset to zero.

Cheers.