Jump to content

Recommended Posts

Posted (edited)

... so I'm working on a little mod, and I've hit kind of a stumbling block. What I want to do is create a script that makes it so once you open a specific door, an NPC force-starts a conversation with you.

 

Now normally I'd look around Skyrim's original scripts for something like that to see how it's done, but I don't remember any event in Skyrim that is triggered by opening a door, so I wouldn't know where to look.

 

Can you please tell me how to do this?

Edited by Falkner1992
Posted

As long as the door is closed...

Make a quest that uses the actor. You need to do this for dialogue anyways.

There might be a default script. What you need is a setstage OnActivate. But here is a script I threw together anyway. Always try to use vanilla presets before custom.


This code is assuming you will be the only one to open the door. Meaning it will remain shut for you.

 
Event OnActivate(ObjectReference akActionRef)
     if myQuest==myStage && akActionREF==Game.GetPlayer()
          myQuest.setStage(nextStage)
     endif
EndEvent


You might want to do the OnTrigger event behind the door instead in case the door is already open for whatever reason.

In the quest stage you should have a forcegreet (the dark brotherhood uses this if you need to reference) AI package with conditions matching your quest's stage you want the conversation to happen on.

This site is helpful: http://www.creationkit.com/Category:Papyrus
  • Recently Browsing   0 members

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