There's two things you could try out on your last event that compares npc's 'food' <= 50. Try adding For each 'npc' for the event, that way you can make sure to compare each one properly or adding Pick by comparison where you pick 'npc' with comparison 'food' <= 50.
So the last event becomes
+ System: For each npc
+ npc: Value 'food' Less or equal 50
+ food: Pick closest to: npc.X, npc.Y
-> npc: Add waypoint at food
or
+ npc: Pick by 'food' Lower or equal 50
+ food: Pick closest to: npc.X, npc.Y
-> npc: Add waypoint at food