Aller au contenu

Photo

Locked door noob qurestion


  • Veuillez vous connecter pour répondre
3 réponses à ce sujet

#1
ShadowWarrior12

ShadowWarrior12
  • Members
  • 10 messages
Hey there everyone. I was just making jail cells for ym module, and when I use my key to unlock the doors, it works. But it does not lock afterwards. It allows anyone to go through once unlocked.  Is there a way to make the doors lock after they are closed again, and so that only they key holder can open and close the doors?

Thanks.

#2
kamal_

kamal_
  • Members
  • 5 254 messages
Yes, you can script the automatic closing (and relocking) if you wish. Many PWs do this. I think Lilac Souls script generator can product that kind of script by default. If you download a prefab released from a PW on the Vault, it's not uncommon for the script to have been left in, and there are some complete PWs out there for download as well.

#3
MokahTGS

MokahTGS
  • Members
  • 946 messages
 Yes, you can set doors to auto close and lock after a delay if you want.  You need to put a custom script on the OnOpen handle of the door in question.  This script should do it:

/////////////////////////////////////////////////////////// Auto-Close Door / Lock Door
/////////////////////////////////////////////////////////
void main()
{
DelayCommand(15.0f,ActionCloseDoor(OBJECT_SELF));
DelayCommand(15.5f,SetLocked(OBJECT_SELF,TRUE));
}
// End


This script was listed on the Neverwinter Nights 2 Wiki page under scripts.  The site is well worth the read, as it covers a lot of information.

#4
ShadowWarrior12

ShadowWarrior12
  • Members
  • 10 messages
Thanks a lot!