Infinite Loop

While loops work between frames so your setup could never work. Basically he while loop if running the script so many times between a single frame that it considers it a endless loop. Since your trying to create movement by checking a value then doing a action then repeat, ie looping the script then i would do just that. Replace your while loop node with a branch then at the end of the script after the move call your gotofood event. This will cause the script to loop as intended until the bool is false. Also you could eliminate the bool and just have nohing after the == output. That would also break you out of the loop