Jump to content

Detecting locked doors


Recommended Posts

Hi all, I'm trying to add a function to my follower to unlock doors. The unlock part is fine, I want to initialize it through dialogue. The thing is, I only want the dialogue to show when player is close to a locked door. So far, I've made a quest alias which finds a matching reference in loaded area, closest. Match conditions getlocked and getisobjecttype door. The alias fills in game. Now for the dialogue, this is where I run in to problems. For the condition, I've tried getdistance parameter use door alias, run on player. This doesn't work. Then I tried run on quest alias, this kinda works but the dialogue always shows. I just want it to show when you are within 64 units distance. Any ideas?

Link to comment
Share on other sites

So I'm understanding here you have some function in papyrus to find a nearby locked door. I don't believe you can actually run a script on entering dialogue with an actor (happy to be proved wrong!), but you could query a boolean variable using https://www.creationkit.com/index.php?title=GetVMQuestVariable or the non-quest equivalent. So if you used registerforsingleupdate, and effectively polled every few seconds, you could set this conditional variable (along with the alias that references the locked door), and the dialogue would be made available.

 

There could of course be some confusion if the door was unlocked in the meantime, or there's more than one valid door target within range.

Link to comment
Share on other sites

So far to find the locked door, I'm just using a quest alias which fills with the closest match in the loaded area, the the match conditions being locked and a door. Not using a script to find the doors. My issue is only having the dialogue pop when close to said alias..Getdistance doesn't seem to work for me here.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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