Scripting " lock a door for a certain time period only "

Old and generally outdated discussions, with the rare hidden gem. Enter at your own risk.

Moderators: Haplo, Lead Developers

Locked
tvb
Member
Posts: 1
Joined: Sun Sep 06, 2009 9:12 am

Scripting " lock a door for a certain time period only "

Post by tvb »

Hello Everyone,

I am attempting my first script and have no clue how to accomplish what I want.

I want to have my npc's house / shop doors lock for the night to simulate them going to bed and reopen again in the morning when they return to work / wake up.

I have downloaded and read the "scripting for dummies" and I am still lost.

Please help.

Thanks
User avatar
Faalen
Developer
Posts: 312
Joined: Wed Jun 18, 2008 5:22 am
Location: America's Dairyland

Post by Faalen »

I'd recommend starting with something much more simple as a first script. If you've never done scripting before, a semi-advanced multi-condition script isn't the best way to go. Try the tutorial in the beginning of SFD, and I don't mean just read it - actually build the script as it lays out. It's a great way to get a handle on the syntax.

In any case, there are already numerous realism mods that do exactly what you're trying to. You could download one and read its scripts to point you in the right direction.
Q1-77-Tel current progress:
[url=http://tamriel-rebuilt.org/old_forum/viewtopic.php?p=266462#266462]Journals 100% done.[/url]
Practical implementation is now underway.
tvb
Member
Posts: 1
Joined: Sun Sep 06, 2009 9:12 am

Post by tvb »

Thanks for the advice, I read the SFD again, this time more carefully and understand a bit more, guess you have to crawl before you can run.

Also took your advice and found a mod that locks doors at night so will use that script as a base for my own.

Hope it works.

Thanks
Locked