llde / xOBSE

Oblivion Script extender source
247 stars 35 forks source link

"Bug"/Request: Check the linked door with GetOpenKey #144

Open Laulajatar opened 2 years ago

Laulajatar commented 2 years ago

The key reference is only set on one side of the door. If a reference isn't returned, then check its linked door with GetLinkedDoor.

set temp1 to GetFormFromMod "Oblivion.esm" "3ac12"
set temp to temp1.GetOpenKey 
printc "door is %n, key is %n" temp1 temp

set temp2 to GetFormFromMod "Oblivion.esm" "3ac11"
set temp to temp2.GetOpenKey 
printc "door is %n, key is %n" temp2 temp

result:

grafik

Would be cool if the command could perhaps check the linked door on its own, or possibly a GetOpenKey2 command that does it, if there is any reason to assume the change in functionality could break existing mods that rely on one side reporting no key.