Hey guys. I''m having a little trouble with an activator being used in my house mod. I'm trying to copy the repository (funny it matches this threads name, that's how I found this site!) from the septimus signus outpost. Now I'm VERY limited in Papyrus, did some Java, so I can understand what stuff does, but I can't come up with this one on my own. The repository doesn't have any scripts or any linked references or any active parents. It seems like the opening of it is controlled by the quest, but even then I can't find any kind of command to play it's animation. My main goal is to have the repository be opened and closed with the push of a dwemer button. Now I've tried copying code from other activations that play an animation, like what's in mzulft03 (the thing where you have to rotate the domes so the lights all focus on the correct spot). The code for that is...
bool openNext = false
bool closeNext = false
Function _Open()
openNext = false
GoToState("Busy")
PlayAnimationandWait("Open", "Done")
GoToState("Opened")
EndFunction
Function _Close()
closeNext = false
GoToState("Busy")
PlayAnimation("Close")
GoToState("Closed")
EndFunction
Function Close()
EndFunction
Function Open()
EndFunction
Event OnInit()
BlockActivation(True)
EndEvent
auto State Closed
Event OnBeginState()
BlockActivation(True)
if (openNext)
Open()
endif
EndEvent
Function Open()
_Open()
EndFunction
EndState
State Opened
Event OnBeginState()
BlockActivation(False)
if (closeNext)
Close()
endif
EndEvent
Event OnActivate(ObjectReference akActivator)
if (akActivator == Game.GetPlayer())
GoToState("Busy")
PlayAnimationAndWait("Trigger01", "Done")
GoToState("Opened")
endif
EndEvent
Function Close()
_Close()
EndFunction
EndState
; defers open and close commands
State Busy
Function Open()
openNext = true
EndFunction
Function Close()
closeNext = true
EndFunction
EndState
I really don't know what to do from here, I've basically tried to take existing code and change it around to fit my needs, but I can't seem to find a good template.
Also, bonus points, would there be an easy way to make a chest that contains the same items found in other copies of that chest in different cells? For example, if I'm in Cell A with Chest A, and I put an object in that Chest A, and then I go to Cell B and look in Cell B, it'll have that same object. And when an object is removed from B, it's also removed from A. Is there an easy way to do this, or do I have to use Papyrus as well?
Thanks everyone!