jamesCag Posted April 18, 2018 Share Posted April 18, 2018 I'm a newbie so forgive me if I missed some vital tutorial. I've been trying to write a script that translates a static floor piece, but it won't work. I tried it again on MovableStatic object (as a wild debug step), and that seems to work. Is there any way to move static objects, or are they not meant to move (as the name implies)? Link to comment Share on other sites More sharing options...
jamesCag Posted April 18, 2018 Author Share Posted April 18, 2018 I seem to be doing these posts a lot where I figure out the answer immediately after my post. I had the positions of the translation reversed so that up was down and down was up. Here's my script in case anyone else is working on an elevator: Scriptname MyFirstButtonScript extends ObjectReference {My first Papyrus script} bool Property up = true Auto ObjectReference Property ElevatorReference Auto Const Auto State AtRest Event OnActivate(ObjectReference akActionRef) GoToState("Busy") If up == true debug.Notification("Go down") debug.Notification(self.GetPositionZ()) ElevatorReference.TranslateTo(ElevatorReference.GetPositionX(), ElevatorReference.GetPositionY(),32, ElevatorReference.GetAngleX(), ElevatorReference.GetAngleY(), ElevatorReference.GetAngleZ(), 100.0, 0) debug.Notification(self.GetPositionZ()) up = false Else debug.Notification("Go up") debug.Notification(self.GetPositionZ()) ElevatorReference.TranslateTo(ElevatorReference.GetPositionX(), ElevatorReference.GetPositionY(), 192.0, ElevatorReference.GetAngleX(), ElevatorReference.GetAngleY(), ElevatorReference.GetAngleZ(), 100.0, 0) debug.Notification(self.GetPositionZ()) up = true EndIf GoToState("AtRest") EndEvent EndState State Busy Event OnActivate(ObjectReference akActionRef) debug.Notification("Cripes Eva, I'm busy! Sign it yourself.") EndEvent EndState Link to comment Share on other sites More sharing options...
jamesCag Posted April 18, 2018 Author Share Posted April 18, 2018 So having had my glorious revelation, I'm not noticing that the object doesn't animate moving. It just pops to the position I've specified after a certain amount of time dictated by the speed parameter. Further, the collision box only moves after it pops into existence elsewhere. I must be missing something. If anyone has pointers I'd be grateful! Link to comment Share on other sites More sharing options...
werr92 Posted April 18, 2018 Share Posted April 18, 2018 Take any misc object, set its motion type to keyframed (SetMotionType()) and look how this will be translated. Any MovableStatic should do the trick too. Statics will not. Link to comment Share on other sites More sharing options...
jamesCag Posted April 19, 2018 Author Share Posted April 19, 2018 Thank you so much! I would never have guessed! I tried on a non-static object after setting the motion type to 4 (keyframe) and it worked! Thanks so much! Link to comment Share on other sites More sharing options...
Recommended Posts