add the stop function for npc nodes