• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

Code Movers

ExoCet-NAW

Grizzled Veteran
Feb 17, 2006
436
32
HI am having some problems setting thes up the way I want to.

I am trying to get a Landing craft to go from A-B with attached 2nd mover (Ramp).

When it reaches the shore, The ramp then lowers and waits for x seconds then closes, the LC then returns to the ship for reinforcments.

Thing is when I change the time settings for the ramp drop (Key 2) it also changes the time on all other keymoves.

thanks for any help.
 
thanks I think I have found what I need.
Found this on a website and it looks like it could be very usefull.
I have added it and it seems to be working as I wanted it to. :)

//=============================================================================
// VariableTimedMover
// Allows custom MoveTimes per key (modified from a version by Fataloverdose)
// by SuperApe -- Sept 2005
//=============================================================================
class VariableTimedMover extends Mover;

var() bool bActAsClientMover;
var() array<float> KeyMoveTime;
var array<float> KeyMoveSpeed;

function PostBeginPlay()
{
local int n;

for ( n = 0; n < KeyMoveTime.length; n++ )
KeyMoveSpeed[n] = KeyMoveTime[n] * MoveTime;

Super.PostBeginPlay();

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 ];
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();
}
}
 
Upvote 0
he better should, but in his place i would modify the pawns jump function which doesnt interact all too well with movers of that kind.

Yeah, men on boats who jump up tend to find that the boat is no longer underneath them when they come down :D

Inheriting velocuty would be good or it could be solved with an invisible mesh attached behind the mover (not a blocking volume - moving blocking volumes = world of hurt). Just as long as no bright spark tries throwing a nade off the back of the boat.
 
Upvote 0