The Elder Scrolls Forums

TES Construction Set and Plugins >> General TES Construction Set

Pages: 1
BlindEye
Initiate

Reged: 04/09/04
Posts: 92
Loc: Canada
Theft of an object causing door lock...?
      #2919763 - 08/12/04 08:36 AM

I would like to implement a script that will cause the doors
of a Traders store to lock when the player steals a specific item;
I presume the script would have two parts, one for the item,
and one for the door. Is this possible?
Would anyone know where I could get such a script?
or is there a way to edit a script in TESCS to comply with this function?





--------------------
But I, being poor, have only my dreams;
I have spread my dreams under your feet;
Tread softly because you tread on my dreams.

W. B. Yates

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

Re: Theft of an object causing door lock...? [Re: BlindEye]
      #2919805 - 08/12/04 08:56 AM

OK, well you need firstly a unique item or items. You also need all the doors from the area to have unique IDs.

The objects in question need to have a script on them, perhpas like his untested one:

Code:
 

Begin PB_Lock_In

if ( MenuMode )
Return
endif

if ( OnActivate ); try with OnPCAdd instead if you like
if ( GetPCCell "Name of cell" == 1 ); prevents this from happening every time the object is activated later in the game
"door 1 "->Lock 50
"door 2"->Lock 50
"door 3"->lock 50
Activate
else
Activate
endif
endif

end



Edited by Patrograd2 (08/12/04 08:58 AM)

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

Reged: 03/04/03
Posts: 406
Loc: Finland
Re: Theft of an object causing door lock...? [Re: BlindEye]
      #2919811 - 08/12/04 08:59 AM

I'd think you could survive with one script in the manner of (not exact, don't copy):

Begin dontsteal script
short doOnce

if (doOnce == 0 )
if (OnActivate == 1)
Messagebox "Uh oh! Looks like some omni-potent entity knows that you've stolen his spoon!"
"Unique_Door_ID"->Setlock 100
;"Demon_guard_of_doom_spoon"->Enable
set doOnce to 1
endif
endif
End

-----------------------------
No?

--------------------
Quoting my favorite madman:
" All these forests shall be lumber for my throne..."

Quoting my favorite barbarian:
"I am the bigger and the stronger, than all these girly monsters"

Some pictures of my latest mod/mods:

http://www.cuneo.us/tesmw/images/Olaf/

Post Extras: Print Post   Remind Me!   Notify Moderator  
BlindEye
Initiate

Reged: 04/09/04
Posts: 92
Loc: Canada
Re: Theft of an object causing door lock...? [Re: ]
      #2919842 - 08/12/04 09:21 AM

Thank you.
I'm building a Mod to flesh out Traders stores, but I'd like to prevent Players stealing from Traders/killing the Trader.
Traders will have added security from bodyguards who are extremely tough and near impossible to kill. However, in the advent that a player is extremely fast, he or she might be able to snatch valuables from the shelves and run! I'd like to stop that from happening... with the script.

I could always use the nopickup script, but I'd like the player to think they have got away with it... until they try the door that is.

Note: The valuables on show are just for eye candy and to temp the player to steal, they are essentially... a trap!

Thank you for your help.


--------------------
But I, being poor, have only my dreams;
I have spread my dreams under your feet;
Tread softly because you tread on my dreams.

W. B. Yates

Post Extras: Print Post   Remind Me!   Notify Moderator  
BlindEye
Initiate

Reged: 04/09/04
Posts: 92
Loc: Canada
Re: Theft of an object causing door lock...? [Re: Olaf_Merchant]
      #2919847 - 08/12/04 09:23 AM

Thank you also Olaf_Merchant : )

I will study and test both scripts.

--------------------
But I, being poor, have only my dreams;
I have spread my dreams under your feet;
Tread softly because you tread on my dreams.

W. B. Yates

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

Re: Theft of an object causing door lock...? [Re: ]
      #2919982 - 08/12/04 10:24 AM

Quote:

OK, well you need firstly a unique item or items. You also need all the doors from the area to have unique IDs.

The objects in question need to have a script on them, perhpas like his untested one:

Code:
 
Begin PB_Lock_In

if ( MenuMode )
Return
endif

if ( OnActivate ); try with OnPCAdd instead if you like
if ( GetPCCell "Name of cell" == 1 ); prevents this from happening every time the object is activated later in the game
"door 1 "->Lock 50
"door 2"->Lock 50
"door 3"->lock 50
Activate
else
Activate
endif
endif

end







This one is a dangerous script since it has multiple activates in the same if (OnActivate == 1 ) loop. See my thread "A problem with a global variable". I had extra statements that went with the second activate and it took me all night to figure out that it was the activate command that was causing all the problems.

Post Extras: Print Post   Remind Me!   Notify Moderator  
BlindEye
Initiate

Reged: 04/09/04
Posts: 92
Loc: Canada
Re: Theft of an object causing door lock...? [Re: ]
      #2920060 - 08/12/04 10:55 AM

I'll go to you're thread militech.

Thank you : )

--------------------
But I, being poor, have only my dreams;
I have spread my dreams under your feet;
Tread softly because you tread on my dreams.

W. B. Yates

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


Extra information
0 registered and 1 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: 43

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