Jump to content

[Skyrim SE] Detect a specific object in the room and disable it


Recommended Posts

Hi everyone!
I'm looking for a way to identify via script if a specific weapon (or object) is physically present in a room, to make it disappear with the enable()
Can someone suggest a way?
Thanks in advance as always to those who will answer!

Link to comment
Share on other sites

You can try something like this: 

Function disableObject(form akBaseObject)
    ObjectReference ref = Game.FindClosestReferenceOfTypeFromRef(akBaseObject, Game.GetPlayer(), 9000.0)
    if ref ;reference was found
        ref.disable()
    Endif
Endfunction
  • Thanks 1
Link to comment
Share on other sites

  • Recently Browsing   0 members

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