Jump to content

Scripted death of Essential NPC


pidgebc

Recommended Posts

I'm starting a project and I can't figure out how to get a chain of events to happen. Here's what I want.

 

I want a friendly essential NPC to vomit like the afflicted do, crouch down into the bleedout state, then die. I want this to happen immediately after speaking to the NPC and progressing the quest to the next stage.

 

After 10 seconds I want this NPC to be resurrected as a hostile zombie that will turn into an ash pile on death. Just like when a necromancer resurrects a corpse. I just want it to happen without a caster.

 

Can anyone help point me in the right direction on this? I'm really stuck and would like to get this project further along.

 

I really appreciate any help you can give me.

Link to comment
Share on other sites

In the goodbye fragment of the dialogue:

akSpeaker.SetEssential(False)
akSpeaker.Kill()

That should properly kill your NPC.

 

You might want to use a scene instead though. So create a scene, make a property for it in your goodbye fragment, in the scene have the above code, and in the dialogue fragment:

MyScene.Start()

MyScene being your scene property.

Link to comment
Share on other sites

You kill me bro

You are far better at scripting than me from what I've seen and don't have http://www.creationkit.com/Category:Papyrus bookmarked! lol

Meh. Takes time.

 

Plus you're way better at texturing, modelling, level design (I think), etc. than I.

 

Back to the subject:

 

You can either create a scene with some code in it that, at different points in the scene, will have the vomiting happen, then after the vomiting phase, have a phase with this script in it:

MyDude.KillEssential()

MyDude being the guy you want to kill. You'd have to set an alias for him to actually have him in the scene, which means you'd likely just reference him as an alias or an action ref instead of the property MyDude, but I can't remember right now, since this is all from my phone.

 

Of course, you'd have to start the scene as well, so in the end fragment of the dialogue, add this (with MyScene set as a Scene property and filled with the appropriate scene):

MyScene.Start()

Or, just have this in the speaking end fragment, though it might be a little less like what you want:

 

akSpeaker.KillEssential()

More information on KillEssential

 

Hopefully that's helps. If you've got any questions, just ask.

Link to comment
Share on other sites

Also, personally anyway, I double down when I want someone dead

I actually remove essential from the base AND actor.kill() actor.killessential()

 

I have had a few times where removing the essential from the base didn't work, and it might have just been script clogging, but from that point on I always double down. Cant see where it could really hurt to so why not :P

 

 

 

I Ctrl+F that page all the time lol

Link to comment
Share on other sites

Okay, so I've almost got what I was after for this part of my project. I created a scene which played at the end of the dialogue I had entered. The only thing I can't figure out is how to get the NPC to vomit like the afflicted do. I know there's a spell and a shout which I assume do this, but I'm not sure how to make the actor use the ability. Does anyone know how to do this?

Link to comment
Share on other sites

Okay, so I've almost got what I was after for this part of my project. I created a scene which played at the end of the dialogue I had entered. The only thing I can't figure out is how to get the NPC to vomit like the afflicted do. I know there's a spell and a shout which I assume do this, but I'm not sure how to make the actor use the ability. Does anyone know how to do this?

MyNPC.Cast(Vomit)

 

Make sure MyNPC is replaced w/ your NPC and Vomit is a spell property.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...