TheArc
Feb 8 2004, 11:43 PM
Can you make it ONLY unlock by key (Unpickable)
gdude
Feb 9 2004, 04:08 AM
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
Feb 9 2004, 05:52 AM
hmmmmmm, maybe, I'll learn up on my scripting and see if it works
Marxist ßastard
Feb 9 2004, 06:33 AM
...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
Feb 9 2004, 12:23 PM
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
Feb 9 2004, 08:16 PM
Couldn't you just make a door with an insanely high lock level using the CS?
Marxist ßastard
Feb 9 2004, 08:54 PM
...Yes, but you can defeat the lock on that door with a pick.
Slaiv
Feb 9 2004, 09:37 PM
Serrieth
Feb 10 2004, 07:38 PM
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
Feb 22 2004, 07:46 PM
thanks alot, i need it for my house mod (with a story/quest

)
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.