The Elder Scrolls Forums

TES Construction Set and Plugins >> General TES Construction Set

Pages: 1
MOO_COW
Curate

Reged: 02/05/04
Posts: 571
Loc: ^ in a field with a hat (more specifically, Sheffield, England :P)
A Door that NEEDs a Key
      #2953941 - 08/21/04 09:07 AM

I need to make a door (load door) that does not have a lock lvl, but you HAVE to have the key to open it, otherwise there's no means of entry. Is it a script i need? If so any useful scripts posted here would be greatly appreciated . Thanks.

MooCow

--------------------
Still round the corner there may wait
A new road or a secret gate;
And though I oft have passed them by,
A day will come at last when I
Shall take the hidden paths that run
West of the Moon, East of the Sun.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Archived User Account

Re: A Door that NEEDs a Key [Re: MOO_COW]
      #2954022 - 08/21/04 10:22 AM

First make a key, lets say it has Id of "Moo_key_01"

Begin PB_Locked_door

short done

if ( OnActivate == 1 )
if ( Player->GetItemCount "Moo_key_01" < 1 )
Messagebox "The door is locked and you need the key" "OK"
Playsound3d "lockeddoor"
elseif (player->GetItemCount "Moo_key_01" > 0 )
if ( done == 0 )
Messagebox "Moo Key used to open door"
Activate
Set Done to 1
elseif ( done == 1 )
Activate
endif
endif
endif

end


Post Extras: Print Post   Remind Me!   Notify Moderator  
Archived User Account

Re: A Door that NEEDs a Key [Re: ]
      #2954432 - 08/21/04 01:16 PM

Would that work on treasure chests as well?

~PS

Post Extras: Print Post   Remind Me!   Notify Moderator  
Zentetsuken
Acolyte

Reged: 09/09/03
Posts: 152
Loc: Europ, Poland
Re: A Door that NEEDs a Key [Re: ]
      #2954625 - 08/21/04 02:15 PM

And will it check for the key everytime the player's will try to open the door?

--------------------
"Many fall, but one remains"- Azura, The Princess of Dusk and Dawn

~~~ Czeladnik Brotherhood of the Secret Flame ~~~~~~~~


Post Extras: Print Post   Remind Me!   Notify Moderator  
Zentetsuken
Acolyte

Reged: 09/09/03
Posts: 152
Loc: Europ, Poland
Re: A Door that NEEDs a Key [Re: Zentetsuken]
      #2954725 - 08/21/04 02:49 PM

Oh and the script dosen't work. It gives my an erroe first about the audio command and later about the MessegeBox, and it can't be compiled.

--------------------
"Many fall, but one remains"- Azura, The Princess of Dusk and Dawn

~~~ Czeladnik Brotherhood of the Secret Flame ~~~~~~~~


Post Extras: Print Post   Remind Me!   Notify Moderator  
Archived User Account

Re: A Door that NEEDs a Key [Re: Zentetsuken]
      #2954909 - 08/21/04 03:48 PM

I cant see why that isnt compiling....I must use this script or a variation thereof almost every day

It will, as it is written, check for the key every every time (and will work on all objects that need keys, or indeed all objects that need an object to activate them). If the player has a key, then the first time it will give a messagebox about 'Key used to open door' but not on subsequent visits.

Hmm, all I can think of is the playsound

It must be

Playsound3d "lockeddoor"

Note the double 'd' in the middle there, its two words, locked and door, bumped together

To change it so that it will only check the first time is just a matter of slight re-organisatio.

Post Extras: Print Post   Remind Me!   Notify Moderator  
slategrey
Curate

Reged: 06/25/02
Posts: 494
Loc: Finland
Re: A Door that NEEDs a Key [Re: ]
      #2955088 - 08/21/04 04:39 PM

Heres a REALLY simple script that does exactly what you want Moo Cow.

begin Bovine_Door_Opener

if ( OnActivate == 1 )

if ( player->getitemcount, "Bovine_Opener" > 0 )
Activate
else
MessageBox "The Door appears magically sealed" "Ok"
endif
endif

End Bovine_Door_opener

Pretty much along the same lines as petrograds but a few less if endif statements. If you want sounds, just add em above the messagebox and above the activate statement.

--------------------
---------------------------------------------
Founder and "Soul" member of the "I love Kai Globes" Fan Club

Kai Globes v2.8, Apprentice Scrolls and Mystic Quills v1.4 . Don't leave Home without them.

Multi Manniquins V1.2; The Manniquin that changes to suit your needs.


Edited by slategrey (08/21/04 04:44 PM)

Post Extras: Print Post   Remind Me!   Notify Moderator  
MOO_COW
Curate

Reged: 02/05/04
Posts: 571
Loc: ^ in a field with a hat (more specifically, Sheffield, England :P)
Re: A Door that NEEDs a Key [Re: slategrey]
      #2955412 - 08/21/04 06:37 PM

ok, thanks for the replies guys, this is a big help. I'll try both out anyway, so no worries about that. Thanks again

--------------------
Still round the corner there may wait
A new road or a secret gate;
And though I oft have passed them by,
A day will come at last when I
Shall take the hidden paths that run
West of the Moon, East of the Sun.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Zentetsuken
Acolyte

Reged: 09/09/03
Posts: 152
Loc: Europ, Poland
Re: A Door that NEEDs a Key [Re: MOO_COW]
      #2957243 - 08/22/04 07:03 AM

Yes the secound script works perfectly. And another question: When i delate the "OK" in this script will it be shown like the one on Cavern of Incarnate doors? (message at the bottom of the screen without button)

--------------------
"Many fall, but one remains"- Azura, The Princess of Dusk and Dawn

~~~ Czeladnik Brotherhood of the Secret Flame ~~~~~~~~


Post Extras: Print Post   Remind Me!   Notify Moderator  
JubJub
Adept

Reged: 08/18/04
Posts: 378
Loc: Wawa, Ontario, Canada
Re: A Door that NEEDs a Key [Re: Zentetsuken]
      #2957266 - 08/22/04 07:13 AM

Maybe look for the script that controls the priest guys liquor cabinet from Bloodmoon's Fort Frostmoth?


--------------------
There's more than one way to skin a cat, but who are these people going around, skinning cats??

Clickey for pickey

\\\\|////
( o Y O ) I start fires!!
T
-______-


Founder of Swords for Nords!

I never apologize! I'm sorry, that's just the way I am!

Post Extras: Print Post   Remind Me!   Notify Moderator  
slategrey
Curate

Reged: 06/25/02
Posts: 494
Loc: Finland
Re: A Door that NEEDs a Key [Re: JubJub]
      #2957296 - 08/22/04 07:28 AM

Yep zentetsuken just delete the ok. The message will then appear and disappear as normal.

--------------------
---------------------------------------------
Founder and "Soul" member of the "I love Kai Globes" Fan Club

Kai Globes v2.8, Apprentice Scrolls and Mystic Quills v1.4 . Don't leave Home without them.

Multi Manniquins V1.2; The Manniquin that changes to suit your needs.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1


Extra information
0 registered and 5 anonymous users are browsing this forum.

Moderator:  Umrahel, Freddo, Pete, Hungry Donner, Attrebus, Miltiades, tegger 

Print Thread

Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Thread views: 151

Rate this thread
 
Jump to

The Elder Scrolls Homepage

*
UBB.threads™ 6.3

Click for Privacy Statement 2003 Bethesda Softworks LLC, a ZeniMax Media company. All Rights Reserved.
PRIVACY POLICY | TERMS & CONDITIONS | LEGAL INFORMATION | CONTACT US