NPCs appearing and disappearing based on conditions

Post » Sat Feb 19, 2011 12:06 am

Is it possible to make NPCs either appear or disappear based on conditions like a quest's stage?

Say at a certain point in a quest I want an NPC to walk away and disappear. At that same time, a different NPC will appear elsewhere. How would I go about doing that? And if it's a script, could someone walk me through that?

Thank you very much.
User avatar
MatthewJontully
 
Posts: 3517
Joined: Thu Mar 08, 2007 9:33 am

Post » Fri Feb 18, 2011 7:47 pm

Sorry I'm not very good with setting up quests etc. but take a look at the gray fox and the thieves guild quests -- they have him do that a few times and it should give you some ideas on how to do it.
User avatar
Cheville Thompson
 
Posts: 3404
Joined: Sun Mar 25, 2007 2:33 pm

Post » Fri Feb 18, 2011 5:47 pm

The simplest way is using two commands:

.Disable <-- this Disables the NPC
.Enable <-- The Enables the NPC

I'm not much good with packages, so don't know enough to explain how to do it by making them walk away, but something like this might do it :

  If ( GetStage [QuestID] >= 20 )     If ( Player.GetInCell [NPC's Cell ID] == 0 )        [NPC's ID].Disable     EndIf  EndIf


Very rough, but something like that can at least cause them to disappear, even if it's sometimes a bit odd when it's done in practice.
User avatar
Rachel Hall
 
Posts: 3396
Joined: Thu Jun 22, 2006 3:41 pm


Return to IV - Oblivion