Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

UDSDemo.CSPawn


00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
//=============================================================================
// The Unreal Director's Suite                  Release version: Jan 7th, 1999
//=============================================================================
//
// [ CSPawn ]
//
// The CSPawn class has been included as an example of how you will need to 
// subclass all of the creatures.  It's annoying, but in the end allows for much 
// greater control over them in a cut sequence.
//
//=============================================================================

class CSPawn expands ScriptedPawn;

var CS_SpikeTape	CSMoveTarget;  // Where is this pawn heading
var CS_ShotList		CSShotList;	   // What shotlist controls this pawn
var name		BeforeActing;	// What state was this pawn in before it was a CS

state ACT_MovingTo
{
     ignores SeePlayer, Bump, EnemyNotVisible, HearNoise, Trigger, WarnTarget;

	function SetFall()
	{
		NextState = 'ACT_Moving'; 
		NextLabel = 'Moving';
		NextAnim = AnimSequence;
		GotoState('FallingState'); 
	}


    function AnimEnd()
	{
	   if (GroundSpeed > 200)
	     PlayFollowRunning();
	   else
	     PlayFollowWalking();
	}

Begin:

	if (GroundSpeed > 200)
		TweenToRunning(0.2);
	else
	    TweenToWalking(0.2);

    SetMovementPhysics();
	WaitForLanding();
	
Moving:


	if (CSMoveTarget == None)
	{
		SetPhysics(PHYS_None);
		GotoState('ActWaiting');
	}

	if (GroundSpeed > 200)	
		PlayRunning();
	else
	    PlayWalking();
	    
	TurnToward(CSMoveTarget);
	MoveToward(CSMoveTarget, GroundSpeed); 

	Goto('Moving');
}

state ActWaiting
{

	function AnimEnd()
	{
		PlayActWaiting();
	}
	
begin:

	Log("[CS] "$Self$" is waiting");
	PlayActWaiting();

}

function BeginCS()
{

	BeforeActing = GetStateName();
	SetPhysics(PHYS_None);
	GotoState('ActWaiting');	

}

function EndCS()
{
	SetMovementPhysics();
	GotoState(BeforeActing);
}

// PlayActWaiting - This is the function an pawn involoved in a CS plays while waiting.  It usually
// plays the normal waiting function, but can be over written.
// 

function PlayActWaiting()
{
  PlayWaiting();
}


function PlayFollowWalking()
{
	PlayWalking();
}

function PlayFollowRunning()
{
	PlayRunning();
}

defaultproperties
{
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: zo 11-11-2012 21:10:30.000 - Creation time: zo 11-11-2012 21:14:18.069 - Created with UnCodeX