And how do you think it was “heavily scripted”?
Using the same AI system that all the other NPCs have access to… that’s how.