Originally Posted by
Tgo01
Does it not work at all?
Only thing I could see possibly being an issue is it only does a check every 3 seconds so if you're passing by someone who needs help during this 3 second pause it won't work. You could try tuning the pause down to like 0.5 or even 0.1 seconds.
You want some sort of pause in a loop otherwise your game might crash. I've found that 0.1 seconds usually prevents this problem, if it's taxing your computer too much (which it shouldn't) you could try upping it to 0.2 or 0.5.