Skip to content

Instantly share code, notes, and snippets.

@Sahasrara
Created April 18, 2018 04:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sahasrara/7e0d243a4a99fb525c1b31a435782f72 to your computer and use it in GitHub Desktop.
Save Sahasrara/7e0d243a4a99fb525c1b31a435782f72 to your computer and use it in GitHub Desktop.
Creation Kit Elevator Script
Scriptname MyFirstButtonScript extends ObjectReference
{My first Papyrus script}
bool Property up = true Auto
Event OnTranslationComplete()
if GetState() == "AtRest"
GoToState("Busy")
Else
GoToState("AtRest")
EndIf
debug.Notification(self.GetPositionZ())
debug.Notification("Done")
EndEvent
Auto State AtRest
Event OnActivate(ObjectReference akActionRef)
GoToState("Busy")
debug.Notification(GetState())
debug.Notification(self.GetPositionZ())
If up == true
debug.Notification("Go down start")
self.TranslateTo(self.GetPositionX(), self.GetPositionY(),32, self.GetAngleX(), self.GetAngleY(), self.GetAngleZ(), 10.0, 0)
up = false
Else
debug.Notification("Go up start")
self.TranslateTo(self.GetPositionX(), self.GetPositionY(), 192.0, self.GetAngleX(), self.GetAngleY(), self.GetAngleZ(), 10.0, 0)
up = true
EndIf
EndEvent
EndState
State Busy
Event OnActivate(ObjectReference akActionRef)
debug.Notification("Cripes Eva, I'm busy! Sign it yourself.")
EndEvent
EndState
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment