Making An NPC Vanish

Post » Thu Jun 21, 2012 8:27 am

I have an NPC that will only be used for the opening quest.

Is anyone aware of a script that would have him leave from the player's sight then vanish?

Thanks!
User avatar
Christine
 
Posts: 3442
Joined: Thu Dec 14, 2006 12:52 am

Post » Thu Jun 21, 2012 12:26 pm

BTW

I was thinking of using a new cell where characters like this can be held, sort of like what gamesas did for the courier.

But I would still need something to teleport him into that cell once he's out of sight....if that's the best method.
User avatar
Nicole Kraus
 
Posts: 3432
Joined: Sat Apr 14, 2007 11:34 pm

Post » Thu Jun 21, 2012 6:17 pm

You could register the player for an OnLOSLost event for the character that triggers him to disable.
User avatar
Eduardo Rosas
 
Posts: 3381
Joined: Thu Oct 18, 2007 3:15 pm

Post » Thu Jun 21, 2012 3:22 am

I looked for "OnLOSLost" in the CK...where do I find that?

The NPC is triggered by his quest when the player enters the room.
User avatar
STEVI INQUE
 
Posts: 3441
Joined: Thu Nov 02, 2006 8:19 pm

Post » Thu Jun 21, 2012 5:40 pm

You want to do

MyNPC.disable()

The question is, when can you do that when the player cannot see it happen (unless you want him to vanish into thin air in front of the player?)

The way I do it is to ensure that the player cannot be in the area when I do the disable. I do that by making the disable call in dialogue later in the quest ... but it is not critical that I get my stuff to disable immediately.

If it is critical that you immediately disable then you could use:

LostLOS: http://www.creationkit.com/OnLostLOS_-_Form (becareful to register and make sure it is an ALIAS you are disabling ... not an object)
ChangeCurrentLocation: http://www.creationkit.com/OnLocationChange_-_Actor (but if your encounter is near a cell border it may be no good)

So it depends how urgent it is to get rid of your NPC and whether or not you want the player to see it disappear.
User avatar
Jade Payton
 
Posts: 3417
Joined: Mon Sep 11, 2006 1:01 pm

Post » Thu Jun 21, 2012 10:53 am

You could also tell him to walk somewhere and wait there, around a corner. Then have the script check every once in a while if the player is far enough way to for it not to be possible for them to see the character, then do a Disable().
User avatar
Benito Martinez
 
Posts: 3470
Joined: Thu Aug 30, 2007 6:33 am


Return to V - Skyrim