Jump to content

Dwemer Lexicon Stand/Cube


zgn92

Recommended Posts

I'm not that familiar with scripting yet, anyone knows how to do this?

As the title says, linking a lexicon cube to a lexicon stand (that when inserted opens a door).

 

Thanks!

Link to comment
Share on other sites

Put this script on the lexicon stand. The properties for the cube and playerRef can be auto-filled. The property for the door needs to be selected manually.

Scriptname yourScriptName extends ObjectReference
  
ObjectReference Property Door01  Auto  
MiscObject Property DA04DweLexiconCubeBlank01 Auto
Actor Property PlayerRef Auto

auto State Empty
	Event OnActivate(ObjectReference akActionRef)
		if PlayerRef.GetItemCount(DA04DweLexiconCubeBlank01) > 0
			GotoState("busy")
			PlayerRef.RemoveItem(DA04DweLexiconCubeBlank01, 1)
			PlayAnimation("setdown")
			utility.wait(1.0)
			PlayAnimation("open")
			utility.wait(1.0)
			Door01.Lock(false)
			Door01.Setopen(True)
			GotoState("Filled")
		endif
	EndEvent
EndState

State Filled
	Event OnActivate(ObjectReference akActionRef)
		GotoState("busy")
		PlayAnimation("close")
		utility.wait(1.0)
		PlayAnimation("pickup")
		utility.wait(1.0)
		PlayerRef.AddItem(DA04DweLexiconCubeBlank01, 1)
		GotoState("Empty")
	EndEvent
EndState

State busy
	Event OnActivate(ObjectReference akActionRef)
		;busy
	EndEvent
EndState

Link to comment
Share on other sites

  • Recently Browsing   0 members

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