Engine
Class ScriptDispatcher

source: c:\runehov\Engine\Classes\ScriptDispatcher.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Keypoint
         |
         +--Engine.ScriptDispatcher
Direct Known Subclasses:None

class ScriptDispatcher
extends Engine.Keypoint

//============================================================================= // ScriptAction. //=============================================================================
Variables
 Pawn WaitingScripter


Function Summary
 void Trigger(Actor Other, Pawn EventInstigator)



Source Code


00001	//=============================================================================
00002	// ScriptAction.
00003	//=============================================================================
00004	class ScriptDispatcher expands Keypoint
00005		native;
00006	
00007	#exec Texture Import File=Textures\S_Action.pcx Name=S_Action Mips=Off Flags=2
00008	
00009	/* Description:
00010		When a pawn is 'Scripting' on a ScriptDispatcher, he immediately executes the
00011		ScriptActions's Properties, then executes the NextOrders
00012	
00013		Look at looktarget
00014		Start playing AnimToPlay
00015		Play SoundToPlay
00016		Broadcast Event
00017		Do NextOrder
00018	
00019		Controls are timed control over dynamic joints, a letter = ControlTimeGranularity seconds
00020	
00021		eg:	aaaaaaaaaaamcmcmcmcmqmacamqd
00022	*/
00023	
00024	struct SAction
00025	{
00026		var() float		Delay;					// Delay before executing
00027		var() name		AnimToPlay;				// Animation to play
00028		var() name		EventToFire;			// Event to broadcast
00029		var() Sound		SoundToPlay;			// Sound to play
00030		var() bool		bTaskLocked;			// TaskLocked during this action
00031	};
00032	
00033	
00034	var(ScriptSync) name	LookTarget[12];				// Target to look at, overrides head control
00035	var(ScriptSync) string	ControlMouth[12];			// lip sync string
00036	var(ScriptSync) string	ControlHead[12];			// head control string [a=left, m=center, z=right]
00037	var(ScriptSync) float	ControlTimeGranularity;		// amount of time to sustain each control movement
00038	
00039	
00040	var(ScriptVars) SAction		Actions[12];			// Actions to execute
00041	var(ScriptVars) name		NextOrder;				// Order to execute after ReachOrder
00042	var(ScriptVars) name		NextOrderTag;			// associated object
00043	var(ScriptVars) bool		bWaitToBeTriggered;		// Wait to be triggered before executing
00044	
00045	
00046	// Internal variables
00047	var Pawn					WaitingScripter;
00048	
00049	
00050	
00051	function Trigger(actor Other, pawn EventInstigator)
00052	{
00053		// Pass this trigger message on to any waiting scripter
00054		if (WaitingScripter != None)
00055		{
00056			WaitingScripter.Release();
00057			WaitingScripter = None;
00058		}
00059	}
00060	
00061	defaultproperties
00062	{
00063	     NextOrder=Scripting
00064	     bDirectional=True
00065	     Texture=Texture'Engine.S_Action'
00066	}

End Source Code