// September 2015 // Levee Patroller / Dijk Patrouille // This source file is (c) by Deltares. This source file is open source but only available to select users. Do not redistribute without written permission of Stichting Deltares, Delft, The Netherlands. // This header has been automatically generated. //============================================================================= // VariableTimedMover // Allows custom MoveTimes per key (modified from a version by Fataloverdose) // by SuperApe -- Sept 2005 // // Check http://wiki.beyondunreal.com/wiki/VariableTimedKeyframeMover for more info //============================================================================= class DynVariableTimedMover extends Mover; var() bool bActAsClientMover; var() array KeyMoveTime; var array KeyMoveSpeed; //Added - Almar: //var byte NumKeys; // Number of keyframes in total (0-3). function PostBeginPlay() { local int n; for ( n = 0; n < KeyMoveTime.length; n++ ) KeyMoveSpeed[n] = KeyMoveTime[n] * MoveTime; Super.PostBeginPlay(); /// 2007-10-15 Jln Modified, added this if check: if (KeyNum < KeyMoveSpeed.Length) { MoveTime = KeyMoveSpeed[ KeyNum ]; } if ( bActAsClientMover && Level.NetMode == NM_DedicatedServer ) { SetTimer( 0, false ); SetPhysics( PHYS_None ); GotoState('ServerIdle'); } } simulated event KeyFrameReached() { MoveTime = KeyMoveSpeed[ KeyNum ]; Super.KeyFrameReached(); } function DoOpen() { MoveTime = KeyMoveSpeed[ KeyNum ]; /// Log( "[" @ self @ "] DoOpen - movetime " @ MoveTime); Super.DoOpen(); } function DoClose() { MoveTime = KeyMoveSpeed[ KeyNum ]; Super.DoClose(); } state ServerIdle { // Do nothing on the Server } state() LoopMove { event KeyFrameReached() { MoveTime = KeyMoveSpeed[ KeyNum ]; Super.KeyFrameReached(); } } state() ConstantLoop { event KeyFrameReached() { MoveTime = KeyMoveSpeed[ KeyNum ]; Super.KeyFrameReached(); } } state() LeadInOutLooper { event KeyFrameReached() { MoveTime = KeyMoveSpeed[ KeyNum ]; Super.KeyFrameReached(); } } state LeadInOutLooping { event KeyFrameReached() { MoveTime = KeyMoveSpeed[ KeyNum ]; Super.KeyFrameReached(); } } /// Almar: function SetMovetime(float value, int index) { local int n; KeyMoveTime[index] = value; for ( n = 0; n < KeyMoveTime.length; n++ ) KeyMoveSpeed[n] = KeyMoveTime[n] * MoveTime; if (KeyNum == index) { MoveTime = KeyMoveSpeed[ KeyNum ]; } } function float GetMoveTime(int index) { return KeyMoveTime[index]; } function SetMoveSpeed(float value, int index) { //KeyMoveSpeed[index] = value; /// Check if updated value is our current key: //if (KeyNum == index) // { // MoveTime = KeyMoveSpeed[ KeyNum ]; // } } function float GetMoveSpeed(int index) { return KeyMoveSpeed[index]; } function SetNumKeys(int num) { self.Numkeys = num; } //Modified by Almar: defaultproperties { bNoDelete=false bStatic=False InitialState=TriggerToggle DrawType = DT_StaticMesh bDynamicLight = true bDynamicLightMover = true bUseDynamicLights = true }