"Disabling" NPCs during certain hours

Post » Wed Dec 24, 2014 11:15 am

This seems like it should be simple, but I'm looking to disable certain NPCs during certain hours. I have a bunch of "traveler" NPCs I've added to towns, who I want to roam around the market during the day, but I want them to go away entirely at sunset and not come back until morning.

I know I could add a package for them to travel to an Inn, or to go into someone's home, but I want them GONE. They are really generic "ambient" NPCs who have no place to live.

Any way I could do this simply? Could I make a travel package that sends them into some sort of a holding cell during the night hours? I'm also concerned that having 20+ extra AI packages running around the clock in each town is going to punch me right in the CPU.

Thanks!

User avatar
Rachel Tyson
 
Posts: 3434
Joined: Sat Oct 07, 2006 4:42 pm

Post » Wed Dec 24, 2014 10:30 am

Via scripting, this is very similar to the lights tutorial on the CK Wiki.

http://www.creationkit.com/Light_Switch

You put it on say, a Quest (a quest script) and make an array of your actors. Then RegisterForSingleUpdateGameTimeAt the time when you should disable, GoToState Disabled, RegisterForSingleUpdateGameTimeAt the time to reenable and if you're in the state Disabled and you OnUpdateGameTime, go to state Enabled.

I can provide an example script if you need one.

User avatar
stevie trent
 
Posts: 3460
Joined: Thu Oct 11, 2007 3:33 pm


Return to V - Skyrim