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.
Locked door noob qurestion
Débuté par
ShadowWarrior12
, juil. 22 2011 04:14
#1
Posté 22 juillet 2011 - 04:14
#2
Posté 22 juillet 2011 - 04:30
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
Posté 22 juillet 2011 - 04:43
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:
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.
/////////////////////////////////////////////////////////// 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
Posté 22 juillet 2011 - 06:11
Thanks a lot!





Retour en haut






