I'm no scripting expert,(more of a noob than anything) but I think on your second line of code,
Quote: "state=0:animate=1
state=0,plrdistwithin=50:rotatetoplr,state=1,timerstart
state=1:lookatplr"
You say: when the player is within 50 units, the entity will rotate to the player and then initiate state 1; state 1 says
Quote: "state=1:lookatplr"
However, the timerstart command comes after state=1. I'm no genius, but I think that nothing allows the script to start the timer. That variable might effect your fourth line of code with waypoints.
Best of Luck,
G4fan
My first game: "Wars of Crime"-31% completed