How I Made AI NPCs that can control their actions along with dialogue