Script to Kill NPC after one line dialog

Post » Mon Jun 18, 2012 4:05 pm

I'd like for an NPC to say one specific line of dialog, and then die. I was planning on using Kill(), but I'm not exactly sure how I should be doing this. I was thinking ideally it would be set up so that it was a Papyrus fragment that runs at the End of the Response Dialog.

Any help would be appreciated. Thanks
User avatar
Jose ordaz
 
Posts: 3552
Joined: Mon Aug 27, 2007 10:14 pm

Post » Mon Jun 18, 2012 4:13 pm

bump
User avatar
Kayla Oatney
 
Posts: 3472
Joined: Sat Jan 20, 2007 9:02 pm

Post » Mon Jun 18, 2012 11:45 am

Kill() is indeed how you kill the actor, you just need to obtain a reference for him in order to make it happen. If this actor is part of a quest, you could set up the NPC as an Alias (under the Quest Aliases tab, and point it to your actor). You would probably type something along the lines of (ActorAliasName as Actor).Kill()

Assuming that your actor is already placed within the world and has a reference (Via double clicking on him) you simply need to setup a property in your script and associate it with your actor. Then run PropertyNameForActor.Kill(). Or you may need to type (PropertyNameForActor as Actor).Kill()

If that doesn't really help you can view my thread where I went through the process of creating an NPC and killing him here: http://www.gamesas.com/topic/1345563-creating-a-fake-corpse-of-an-actor-specifically-the-player

Hope it helps!
User avatar
Rachell Katherine
 
Posts: 3380
Joined: Wed Oct 11, 2006 5:21 pm


Return to V - Skyrim