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?