Help - Search - Members - Calendar
Full Version: Locked door question
The Nexus Forums > Specific Games > Morrowind > Morrowind Plug-Ins > TES Construction Set
TheArc
Can you make it ONLY unlock by key (Unpickable) huh.gif
gdude
You could have a script that would only allow you to open the door with a certain key. I'm terrible at scripting but I'm pretty sure it would be easy to do. Just have the script check if you have the key when you try to open the door. If you don't, a message box could pop up telling you that you need the key to open the door, and if you do have the key the door would open. At least I think that would work....
TheArc
hmmmmmm, maybe, I'll learn up on my scripting and see if it works
Marxist ßastard
...Like so...

Begin "#mws_scpt_door_OMFG_LIEK_TEH_DOER_2_OBLEVEON"

; Because I can, damnit!

short Opensesame

If ( Opensesame == 1 )
Return
ElseIf ( OnActivate == 1 )
If ( Player->GetItemGount XXX > 0 )
Set Opensesame to 1
Activate
Else
MessageBox "YYY"
Return
EndIf
EndIf

End

...Where XXX is the ID of the key and YYY is the message you want displayed when the PC attempts to open the object without a key (The MessageBox command and its YYY argument can be removed without any negative consequences -- alternatively, you can replace the line with any command or series of commands you wish to execute).

If you want to detect if the PC has used a lockpick on the object, there's a variable or two that you can access for that purpose that's added in the Bloodmoon expansion -- see the script on the desk in a room above the Fort Frostmoth armory for an example of this.
Xeniorn
Here is am example from Prison Ship Escape mod.

begin darken_doorscript

if ( OnActivate == 1 )
if ( Player->GetItemcount, "_darken_lower_key" == 1 )
Activate

else
MessageBox "You need the Darkenhold Lower Prision key to open this door"
endif

endif

End
Slaiv
Couldn't you just make a door with an insanely high lock level using the CS?
Marxist ßastard
...Yes, but you can defeat the lock on that door with a pick.
Slaiv
I see........

Well then just use the above mentioned methods. Except for you have to ad one thing: Make the door trapped, D&D style. That way, if anyone without the key tries to open it, a massive rift opens in front of the door, and sucks the person in. Soon, they are located in a massive pit of fire, doomed to burn undying for all eternity..... holloween.gif holloween.gif holloween.gif MWAHAHAHAHAHAHAH! holloween.gif holloween.gif holloween.gif

Sorry, been hittin up on the old brownies again....... innocent.gif
Serrieth
No no people! If you don't want to have a key open a door, just go to Misc items and make an Item that might be what ever you want, then go to the doors properties by double-clicking on the door and say Locked and choose your item or key. You don't have to use a script! Only if its not a Door.
TheArc
thanks alot, i need it for my house mod (with a story/quest biggrin.gif )
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.