Created
April 18, 2018 04:47
-
-
Save Sahasrara/7e0d243a4a99fb525c1b31a435782f72 to your computer and use it in GitHub Desktop.
Creation Kit Elevator Script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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