Jump to content

Help Please. New to modding need NPC to die after dialogue.


Recommended Posts

Posted

So, I'm making my first mod and I have the exterior finished and there's just one small npc script I need to finished it off. Literally all I need is for an NPC to die after their last line of dialogue. I've never coded, for memory reasons, and I don't really plan to add anything more than this.


 


The situation is a torture victim dying after giving you some information.


 


I would really love if you could make this as dumbed down as possible >.< and, I know it's stupid, but screenshots of such code where it goes in the creation kit (images mesh more with my brain better than text even if it's just an image of the text... I know, I'm weird).


Posted

There is a "Scripts" area in the "Topic info" window where you typed the dialog.

The scripts area has two boxes where you can put papyrus code.

The code on the second box runs when the actor finishes speaking

Put this line in the second box and hit its compile button, ok all windows and save

 

akSpeaker.Kill()

Posted

Find the dialogue Info after which you want the NPC to die (Infos are dialogue lines spoken by NPCs; if you have already created all of your dialogue, you should be familiar with these).

 

Open it such that you can see two fields for scripts to be written (Begin and End).

 

(I'll assume you have the "Goodbye" flag checked. It would just be good form here since you do plan on having the NPC die right after, hence ending the conversation.)

 

Type "akSpeaker.Kill()" into the "End" box since you want the script to execute after the dialogue has been spoken.

 

For a bit more complexity, try using the script:

Utility.Wait(5)
akSpeaker.Kill()

instead (as before, in the "End" box) so that the death doesn't seem so abrupt (the Wait() function above gives the death a 5 second delay).

 

-----

B3lisario, you ninja!  :lol:

Posted

looks like this

+-----------------------------------------+                                
|                                         |                                
|  +-----------------------+              |                                
|  |-----------------------|              |                                
|  +-----------------------+ +-------+    |                                
|  |                       | |       |    |                                
|  +-----------------------+ |       |    |                                
|  +-----------------------+ |       |    |                                
|  |                       | |       |    |                                
|  |                       | |       |    |                                
|  |                       | |       |    |                                
|  +-----------------------+ +-------+    |                                
|                        +--------+       |                                
|  +--------+ +--------+ |        |       |                                
|  |        | | HERE   | |        |       |                                
|  |        | |        | |        |       |                                
|  +--------+ +--------+ +--------+       |                                
|                                         |                                
|                                         |                                
+-----------------------------------------+                                
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           

Posted

looks like this

+-----------------------------------------+                                
|                                         |                                
|  +-----------------------+              |                                
|  |-----------------------|              |                                
|  +-----------------------+ +-------+    |                                
|  |                       | |       |    |                                
|  +-----------------------+ |       |    |                                
|  +-----------------------+ |       |    |                                
|  |                       | |       |    |                                
|  |                       | |       |    |                                
|  |                       | |       |    |                                
|  +-----------------------+ +-------+    |                                
|                        +--------+       |                                
|  +--------+ +--------+ |        |       |                                
|  |        | | HERE   | |        |       |                                
|  |        | |        | |        |       |                                
|  +--------+ +--------+ +--------+       |                                
|                                         |                                
|                                         |                                
+-----------------------------------------+                                
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           

 

I'm more amazed by the art than the instructions O.o..... Also, THANK YOU SO MUCH! I feel so dumbuh now. You're a life saver. Now my brain will let me move on to the interiors.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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