Jump to content

DD5.1 LockDevice(...) not working as intended


Recommended Posts

Posted

Hi, I finally got enough patience for Creation Kit setup (it took over 4 hours to get all required scripts, but finally it's at least compiling code...)

 

The problem is that I made a script (check below), which works correctly until calling libs.LockDevice. It adds device to player's inventory, however this device is not being locked on actor (it just stays in inventory). I've tried various solutions, but none worked (changing property value, changing property to zadLibs one etc.)

 

Script is attached to ObjectReference (amulet).

 

Scriptname DeviousMaraAmuletScript extends ObjectReference  

zadLibs Property libs Auto

Event OnEquipped(Actor akActor)
  ; Setup zadLibs if null  
  if libs == none 
    libs = Quest.GetQuest("zadQuest") as zadLibs  
  endIf

  ; Check if player
  if akActor == Game.GetPlayer()
    ; Print message
    Debug.Notification("Wearing this amulet was a mistake.")

    ; Equip Devious Device
    libs.LockDevice(akActor, libs.glovesRestrictive, true)
  endIf
endEvent

 

How it ends in game (not worn):

ScreenShot2.png.efe0ca1ecc3225cbeef5b6b10be39202.png

 

I wonder how big idiot I am... (Other mods are working correctly).

Posted

Finally forced Papyrus to dump that logs... (It was not that easy, because Windows permission system is made by Microsoft (which owns Bethesda))...

 

[02/02/2022 - 07:52:04PM] ERROR: Method GetWornForm not found on Actor. Aborting call and returning None
stack:
	[zadQuest (0A00F624)].zadlibs.GetWornRenderedDeviceByKeyword() - "zadLibs.psc" Line 690
	[zadQuest (0A00F624)].zadlibs.SwapDevices() - "zadLibs.psc" Line 472
	[zadQuest (0A00F624)].zadlibs.LockDevice() - "zadLibs.psc" Line 379

 

This seems like getting Bethesda'ed.

 

YEP. SKSE reinstall fixed that issue... I love when something gets broken without even touching it...

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...