I have built a tavern and populated it with NPCs. I need to make it so that when I pull a lever in the tavern, all the NPCs run outside as fast as they can, like an evacuation.
I originally had a script attached to the lever that called the PathToReference function on an actor, but it literally did nothing. And I read that AI Packages were the only way to control NPC behavior. So here I am trying to creation a package called Evacuate, that makes an NPC exit the room when the level in the room is activated. However, I can not figure out anyway to make the lever interact with an AI package.
I figured I would have a script attached to the lever that would cause the AI package to occur on the lever's activate function.
I started making a custom AI package called Evacuate that is a template of Travel, and when I attach it to an NPC and place it at the top of the package queue, it works! However, it works in the sense that as soon as the room loads, the NPC starts running to the target location. I can't figure out how to make it so the package happens on the lever.
TL;DR Is there a way to "activate" an AI Package on an event, e.g. a trigger activation?