Setting a door lock to leveled via script?

Post » Fri Feb 18, 2011 8:23 pm

As I'm currently trying to create a delayer for a quest mod I've downloaded, I'm looking for help to adjust the level of a locked door to leveled (should be level 0) via script.

In the original file, the door's lock is in fact set to leveled, but I'd like to make the whole house inaccessible at all until a certain quest stage triggers. To do that, I gave the persistent reference a name and set its lock level to 100 (needs a key). Then I opened the associated quest script and added these the three lines to the begin gamemode section:

if getstage XXX >= 1
DoorXXX.lock 0
endif

Unfortunately, it does not work as intended. The level of the door remains at 100 (needs a key) after the character has reached the corresponding quest stage. Setting it to very easy (7), easy (20), average (40) etc. works, but I'd like to have it leveled at a certain quest stage. Is there any way to do that?
User avatar
Bones47
 
Posts: 3399
Joined: Fri Nov 09, 2007 11:15 pm

Post » Sat Feb 19, 2011 12:35 am

I'm not really sure what you're asking for here. Lock level 0 would basically be unlocked (meaning there would be no need for a key at all). If that's what you're after, you can use DoorXXX.Unlock for that.
User avatar
john page
 
Posts: 3401
Joined: Thu May 31, 2007 10:52 pm

Post » Fri Feb 18, 2011 11:24 pm

I'm not really sure what you're asking for here. Lock level 0 would basically be unlocked (meaning there would be no need for a key at all). If that's what you're after, you can use DoorXXX.Unlock for that.


Ok, so I got that wrong.

I just want the lock to level with the player and would like to achieve that via script. It should hopefully be set to 100 (needs a key) and should become leveled after a certain quest stage triggers in.
User avatar
Darlene Delk
 
Posts: 3413
Joined: Mon Aug 27, 2007 3:48 am

Post » Fri Feb 18, 2011 10:34 pm

It might be easier to have two doors. One door that goes nowhere, and is locked to 100. The other door that is leveled, you disable.
At the time you want the place accessable, you disable the nowhere door and enable the locked door.
User avatar
LuCY sCoTT
 
Posts: 3410
Joined: Sun Feb 04, 2007 8:29 am

Post » Sat Feb 19, 2011 12:10 pm

It might be easier to have two doors. One door that goes nowhere, and is locked to 100. The other door that is leveled, you disable.
At the time you want the place accessable, you disable the nowhere door and enable the locked door.


Good Idea and quite creative as well :)

Thanks a lot!
User avatar
Nadia Nad
 
Posts: 3391
Joined: Thu Aug 31, 2006 3:17 pm


Return to IV - Oblivion