Notes:Harry Potter and the Sorcerer's Stone (PC)

skdudley-skdudley.ScriptText.TXT
//=============================================================================== // [skdudley] //===============================================================================

class skdudley extends dudley;
 * 1) exec MESH MODELIMPORT MESH=skdudleyMesh MODELFILE=models\skdudley.PSK LODSTYLE=10
 * 2) exec MESH ORIGIN MESH=skdudleyMesh X=0 Y=0 Z=40 YAW=0 PITCH=0 ROLL=0
 * 3) exec ANIM IMPORT ANIM=skdudleyAnims ANIMFILE=models\skdudley.PSA COMPRESS=1 MAXKEYS=999999 IMPORTSEQS=1
 * 4) exec MESHMAP  SCALE MESHMAP=skdudleyMesh X=1.0 Y=1.0 Z=1.0
 * 5) exec MESH DEFAULTANIM MESH=skdudleyMesh ANIM=skdudleyAnims

// Digest and compress the animation data. Must come after the sequence declarations. // 'VERBOSE' gives more debugging info in UCC.log
 * 1) exec ANIM DIGEST ANIM=skdudleyAnims VERBOSE


 * 1) EXEC TEXTURE IMPORT NAME=skdudleyTex0 FILE=TEXTURES\Dudley_SKIN00.bmp  GROUP=Skins


 * 1) EXEC MESHMAP SETTEXTURE MESHMAP=skdudleyMesh NUM=0 TEXTURE=skdudleyTex0

// Original material [0] is [SKIN00] SkinIndex: 0 Bitmap: Dudley_SKIN00.bmp Path: \\Baker\HPotterPC\Art\Design\Character Development\Dudley


 * 1) exec MESH WEAPONATTACH MESH=skdudleyMesh BONE="RightHand"
 * 2) exec MESH WEAPONPOSITION MESH=skdudleyMesh YAW=0 PITCH=0 ROLL=10 X=0.0 Y=0.0 Z=0.0

Dudley-Dudley.ScriptText.TXT
/*			Dudley, enemy of all that is true and good

class Dudley extends baseChar;

var int dialog1[10]; var int currentspeech; var name prevState; var rotator oldRot; var weapon weap;

state yellAtHarry {

begin: prevState=GetStateName; playanim('look'); oldRot=rotation; turnto(p.location); SLEEP (5);

gotostate(prevstate); goto 'begin';

}

function yellAt {

local sound step; step=speech[01]; PlaySound(step, SLOT_Talk,1.0, false, 1000.0, 0.9); gotostate('yellAtHarry'); }

function DialogResponse(int dialogNum) {		local sound step; step=speech[dialogNum]; PlaySound(step, SLOT_Talk,1.0, false, 1000.0, 0.9); }

/*

state faceHag {

function Tick(float DeltaTime) {

}

begin: moveto(forcelocation); Disable( 'tick' ); loopanim('breath');

floop: turnto(forcedir); sleep(1.0); goto 'floop';

}



state spottedharry {

begin:

//	p.clientMessage("spotted harry"); gotostate('wait'); }

state atStation {

begin:

desiredRotation=(destP.rotation);

loop:

sleep(destP.aiData[stationNumber].pauseTime); //	p.clientMessage("sleeptime "$destP.aiData[stationNumber].pauseTime); stationDestination=destP.aiData[stationNumber].stationDestination; pathType=destP.aiData[stationNumber].pathType; firstPath=destP.aiData[stationNumber].firstPath; //	p.clientMessage("back to patrol"); gotostate('patrol');

sleep(1); goto 'loop';

} auto state wait {

function startup {

local weapon weap;

foreach allActors(class'baseHarry', p)		{ if( p.bIsPlayer&& p!=Self) {				break; }		}

foreach allActors(class 'navigationPoint',navP) {			destP=baseStation(navP); if(destP.Name==stationDestination) {				break; }		}		foreach allActors(class 'navigationPoint',navP) {

if(navp.Name==firstPath) {				break; }		}

PendingWeapon = spawn(class'RCTruckControl'); ChangedWeapon;

weap.WeaponSet(self);

}

begin: startup; SetPhysics(PHYS_Rotating);

disable('tick'); loopanim('smash'); loop: sleep(2.01);

PendingWeapon = spawn(class'WTruck'); ChangedWeapon; sleep(3); goto 'loop';

}

state patrol {

function startup {		foreach allActors(class'baseHarry', p)		{ if( p.bIsPlayer&& p!=Self) {				break; }		}

foreach allActors(class 'navigationPoint',navP) {			destP=baseStation(navP); if(destP.Name==stationDestination) {				break; }		}		foreach allActors(class 'navigationPoint',navP) {

if(navp.Name==firstPath) {				break; }		}

}

function touch (actor other) {

if(other==destp) {		gotostate('atstation'); } }

Begin: Disable( 'Tick' ); Enable('Touch'); SetPhysics(PHYS_Walking); startup;

loopAnim('walk');

moveLoop: next=findPath(navP,stationDestination); //		if(next!=none) //			p.clientMessage("next is "$next); //		if(navp!=none) //			p.clientMessage("in patrol towards "$navp); do {			moveTo(navP.location); sleep(0.005); }until(vsize(location-(navP.location))<50);

if(destp==navP) {			gotostate('atstation'); }

navP=navigationPoint(next); next=none; goto 'moveLoop';

}

state takeRemote {

function startTruck {	local truck t;	foreach allactors(class'truck',t) {		t.bHidden=false; t.gotostate('patrol'); break;

} }

begin: playanim('sit2stand'); startTruck; loop: sleep(2); PendingWeapon = spawn(class'RCTruckControl'); ChangedWeapon;

weap.WeaponSet(self);

gotostate('patrol');

}

petunia-petunia.ScriptText.TXT
/* //			Petunia, enemy of all that is true and good

class petunia extends baseChar;

var int dialog1[10]; var int currentspeech; var int status;

state spottedharry {

}

function yellAt {

local sound step; step=speech[01]; PlaySound(step, SLOT_Talk,1.0, false, 1000.0, 0.9); //	turnto(p); }

state atStation {

begin:

//	p.clientmessage("at station"); loopAnim('scrub');

SetPhysics(PHYS_Rotating);

desiredRotation=(destP.rotation);

loop: sleep(destP.aiData[stationNumber].pauseTime); //	p.clientMessage("sleeptime "$destP.aiData[stationNumber].pauseTime); stationDestination=destP.aiData[stationNumber].stationDestination; pathType=destP.aiData[stationNumber].pathType; firstPath=destP.aiData[stationNumber].firstPath; //	p.clientMessage("back to patrol"); gotostate('patrol');

goto 'loop';

}

auto state patrol {

function startup {		foreach allActors(class'baseHarry', p)		{ if( p.bIsPlayer&& p!=Self) {				break; }		}

foreach allActors(class 'navigationPoint',navP) {			destP=baseStation(navP); if(destP.Name==stationDestination) {				break; }		}		foreach allActors(class 'navigationPoint',navP) {

if(navp.Name==firstPath) {				break; }		}

}

Begin: Disable( 'Tick' ); SetPhysics(PHYS_Walking); startup;

loopAnim('walk');

moveLoop: next=findPath(navP,stationDestination); //		if(next!=none) p.clientMessage("next is "$next); //		if(navp!=none) p.clientMessage("in patrol towards "$navp); do {			moveTo(navP.location); sleep(0.005); p.clientmessage("distance to navp is "$vsize(location-(navP.location))); }until(vsize(location-(navP.location))<50);

if(destp==navP) {			gotostate('atstation'); }		navP=navigationPoint(next); next=none; goto 'moveLoop';

}

Harrye3-Harrye3.ScriptText.TXT
//============================================================================= // Harry -- hero character //============================================================================= class Harrye3 extends Harry;

function PostBeginPlay { 	Super.PostBeginPlay; baseWand(weapon).addSpell(Class'spellAloho');

}

Generic NPC Script
With the exception of each class name, this script is identical for the following files:

E3Crabbe-E3Crabbe.ScriptText.TXT

E3Draco-E3Draco.ScriptText.TXT

E3Fred-E3Fred.ScriptText.TXT

E3George-E3George.ScriptText.TXT

E3Goyle-E3Goyle.ScriptText.TXT

class E3Crabbe extends baseChar; function PostBeginPlay {	Super.PostBeginPlay; LoopAnim('plot', 1.0, 0.0); } auto state idle{ begin: loop: LoopAnim('lookdownhall', 1.0, 0.0); finishanim; goto 'loop'; }