How would I do that?
Bool bQuickening If bQuickening != (Game.GetPlayer().GetParentCell() == SpinningGearREF.GetParentCell()) bQuickening = !bQuickening If bQuickening RegisterForUpdate(Math.Pow(10, -23)) ; 0.000000000000000000000001 Else UnregisterForUpdate() EndIf EndIf
Scriptname _movescripttest extends ObjectReference {Should be the thing that scrolls the landscape}int initdone float xlimitfloat xstartfloat xnowBool bQuickeningEvent OnCellLoad() if (initdone == 0) xstart = self.GetPositionY() xlimit = xstart - 3000 initdone = 1 endIfEndEventFunction FunctionForUpdating() If bQuickening != (Game.GetPlayer().GetParentCell() == self.GetParentCell()) bQuickening = !bQuickening If bQuickening RegisterForUpdate(Math.Pow(10, -23)) ; 000000000000000000000001 Else UnregisterForUpdate() EndIf EndIfEndFunctionEvent OnUpdate() self.setPosition(self.GetPositionX(), (self.GetPositionY() - 2) ,self.GetPositionZ()) xnow = self.GetPositionY() if (xnow > xlimit) xnow = xlimit + 3000 self.setPosition(self.GetPositionX(), (xnow) ,self.GetPositionZ()) endifEndEventScriptname TunnelWallScript extends ObjectReferenceFloat property Speed autoObjectReference property StartPoint autoObjectReference property EndPoint autoBool Toggle = TrueEvent OnInit() SetDestroyed()EndEventFunction ToggleMoving() if (Toggle) TranslateToRef(EndPoint, Speed, 0) else StopTranslation() endif Toggle = !ToggleEndFunctionEvent OnTranslationComplete() MoveTo(StartPoint) Toggle = True ToggleMoving()EndEvent
Scriptname MoveLoopObject Extends ObjectReferenceObjectReference Property StartPoint AutoObjectReference Property EndPoint AutoFloat Property Speed AutoBool Property ToggleFloat Property StartX AutoFloat Property StartY AutoFloat Property StartZ AutoFloat Property RotX AutoFloat Property RotY AutoFloat Property RotZ AutoEvent OnInit() StartX = X StartY = Y StartZ = Z RotX = GetAngleX() RotY = GetAngleY() RotZ = GetAngleZ() ; Saves editor location for final step.Event OnTranslationComplete() MoveTo(StartPoint) If Toggle TranslateToRef(EndPoint,Speed) else TranslateTo(StartX,StartY,StartZ,RotX,RotY,RotZ,Speed) ; Go back to your start location. endifEndEventEvent OnActivate() If Toggle Toggle = False else Toggle = True TranslateToRef(EndPoint,Speed) endifEndEvent
Scriptname MoveLoopObject Extends ObjectReferenceObjectReference Property StartPoint AutoObjectReference Property EndPoint AutoFloat Property Speed AutoBool Property Toggle AutoEvent OnTranslationComplete() MoveTo(StartPoint) If Toggle TranslateToRef(EndPoint,Speed) else MoveToMyEditorLocation() endifEndEventEvent OnActivate() If Toggle Toggle = False MoveToMyEditorLocation() else Toggle = True TranslateToRef(EndPoint,Speed) endifEndEvent
Scriptname TriggerScript extends ObjectReferenceSound Property MySound AutoFloat Property MaxInterval AutoFloat Property MinInterval AutoFunction SimulateBump(Bool bActivate = True) if (bActivate) Activate(Self) endif Game.GetPlayer().PushActorAway(Game.GetPlayer(), 1) MySound.Play(Self) Game.ShakeCamera() if (bActivate) Utility.Wait(0.1) Activate(Self) endifEndFunctionAuto State Inactive Event OnBeginState() Activate(Self) SimulateBump(False) EndEvent Event OnTriggerEnter(ObjectReference TriggerRef) if (TriggerRef == Game.GetPlayer()) GoToState("Active") endif EndEvent Event OnUpdate() EndEventEndStateState Active Event OnBeginState() Activate(Self) SimulateBump(False) RegisterForSingleUpdate(Utility.RandomFloat(MinInterval, MaxInterval)) EndEvent Event OnTriggerLeave(ObjectReference TriggerRef) if (TriggerRef == Game.GetPlayer()) GoToState("Inactive") endif EndEvent Event OnUpdate() SimulateBump() RegisterForSingleUpdate(Utility.RandomFloat(MinInterval, MaxInterval)) EndEventEndState