Jump to content

Photo

Getting the game to recognize the Story Manager LockPick Event

skyrim mods creation kit ck lockpick storymanager dialogue scenes

  • Please log in to reply
43 replies to this topic

#41
Martimius

Martimius

    Virgin of Justice

  • Supporter
  • PipPipPipPip
  • 1,393 posts
It seems to work, finally! 100% of the time. Thanks for all your help! How could I add a condition for it to only run on locked containers though? It even runs when I lock pick a door to a new cell. Tried looking up possible papyrus conditions but I haven’t found a result so far.

#42
IsharaMeradin

IsharaMeradin

    The Pale Redguard

  • Members
  • PipPipPipPipPip
  • 8,742 posts

With SKSE use GetType to weed out the targeted object.

Basically, it would be something like:

If (Ref.GetBaseObject().GetType() == 28) ; where Ref is the object reference of the locked object in question.



#43
dylbill

dylbill

    Faithful poster

  • Supporter
  • PipPipPipPip
  • 1,334 posts

Glad it's working! GetType will work, but you could check by casting as Container also. Like so: 

 

Scene property SDA_LockpickingScene Auto

Event OnInit()
    RegisterForMenu("Lockpicking Menu")
EndEvent

Event OnMenuClose(String menuName)
    ObjectReference LockRef = Game.GetCurrentCrosshairRef()
    
    If (LockRef.IsLocked() == false) && (LockRef.GetBaseObject() As Container)
        Utility.Wait(1)
        Debug.Notification("Lock Picked")
        SDA_LockpickingScene.Start()
    EndIf 
EndEvent

Edited by dylbill, 16 June 2020 - 05:24 PM.


#44
Martimius

Martimius

    Virgin of Justice

  • Supporter
  • PipPipPipPip
  • 1,393 posts

It WORKS PERFECTLY. THANKS!!!!  :laugh:







Also tagged with one or more of these keywords: skyrim, mods, creation kit, ck, lockpick, storymanager, dialogue, scenes

Page loaded in: 1.014 seconds