Jump to content

quest locked containers


BlueDragon8137

Recommended Posts

Was looking at the lock control for alien containers to us in my vault mod. And was wondering if they can be locked until completion of Quest: “Not of this World”.

 

Any help on this would be appreciated greatly as I'm a fairly new modder.

Link to comment
Share on other sites

You could put a script on them that does a check for completion of that quest. Using on the last stage of the quest would tell you if the stage is done, and therefore the quest is complete. Then you just unlock self if it's a script running on the container, or use the RefID if you run it in a quest script.

 

Your two options for doing this are either an object script or a quest script. The object script will be easier overall, but can have adverse effects in heavily loaded areas because every instance of the object runs its own instance of the script. The quest script takes more work, but if you're already using a managing quest, it's just a few more lines to add and saves resources.

 

Either way, the script will be something of the sort:

if GetStageDone QuestID StageIndex
;If object script, use these lines
set rSelf to GetSelf
rSelf.Unlock
;If using quest script, use these lines
Container1REF.Unlock
Container2REF.Unlock
;etc etc
endif

If using the object script, then rSelf is declared as a ref type variable. If using a quest script, then just make sure that the name of ContainerREF1/2/etc is the same as the name you give that container reference (the object placed in the cell, not the actual object name in the list of objects).

 

Hope this helps, if you have more questions or need me to clarify, just let me know.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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