I don't know any Papyrus, only Lua, it has some similarities but its rather hard to get used too...
Here is the script;
Scriptname BlackreachDoorScript extends ObjectReference Conditional{Script to open the door to blackreach when activated by the lock.}import gameimport debugimport utilitybool property isOpen = false auto Conditional{set to true to start open}bool property isAnimating = false auto Hidden{is the activator currently animating from one state to another?}string property openAnim = "Down" auto Hidden{animation to play when opening}string property openEvent = "TransDown" auto Hidden{open event name - waits for this event before considering itself "open"}int myState = 1; true when static or animating; 0 == open or opening; 1 == closed or closingEVENT OnLoad()if (isOpen ) myState = 0endifendEVENTauto STATE waiting ; waiting to be activatedEVENT onActivate (objectReference triggerRef) ; switch open state when activated SetOpen(!isOpen)endEVENTendStateSTATE busy; This is the state when I'm busy animating EVENT onActivate (objectReference triggerRef) trace (self + " Busy") endEVENTendSTATEfunction SetOpen(bool abOpen = true); if busy, wait to finishwhile getState() == "busy" wait(1)endWhile; openisAnimating = true if !isOpen gotoState ("busy") trace(self + " Opening") playAnimationandWait(openAnim, openEvent) ; Animate Open endif trace(self + " Opened") isOpen = true gotoState("done")isAnimating = falseendFunctionSTATE done; This is the end state, player should not be able to reactivateendSTATEI am wondering if anyone can make it so that the 'passage' can be toggled rather than it only being able to open...
I will be making a new script for a copied version of the 'DweBREntrance01' so it wont mess up the original one.
