Problem with Mover Script

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

ncmpinc

New Member
Apr 12, 2004
13
0
0
I've created a Special type of mover, but it doesnt work properly.
With a use trigger it must be toggled between 3 keyframes.

Code:
//=============================================================================
// MoverCnt.
//=============================================================================
class MoverCnt extends Mover;

var() byte Value;
Var() Const byte MaxValue;

// Open the mover.
function DoNext()
{
	bOpening = true;
	bDelaying = false;
	Value++;
	if (Value>MaxValue) Value=0; 
	InterpolateTo( KeyNum, MoveTime );
	MakeNoise(1.0);
	PlaySound( OpeningSound, SLOT_None, SoundVolume / 255.0, false, SoundRadius, SoundPitch / 64.0);
	AmbientSound = MoveAmbientSound;
	TriggerEvent(OpeningEvent, Self, Instigator);
}


// Toggle when triggered.
state() TriggerNext
{
	function Trigger( actor Other, pawn EventInstigator )
	{
		SavedTrigger = Other;
		Instigator = EventInstigator;
		if ( SavedTrigger != None )
			SavedTrigger.BeginEvent();
		GotoState( 'TriggerNext', 'Next' );
	}
Next:
	if ( DelayTime > 0 )
	{
		bDelaying = true;
		Sleep(DelayTime);
	}
	DoNext();
	FinishInterpolation();
	FinishedOpening();
	if ( SavedTrigger != None )
		SavedTrigger.EndEvent();
	Stop;
}

defaultproperties
{
     InitialState="TriggerNext"
}
 

conscripted

New Member
Mar 1, 2004
113
0
0
australia
hages.net
you need to put what your problem is. but in the ed, have you sent mover.NumKeys = 3? defaultly, movers have two keysframes, the 0 and 1 (which are set as 1 and, if you want 3 keys, then you have to put 3 in this box.