CustomNPCPawn

class GiacomettiNPCPawn extends UTPawn

placeable;

var(NPC) SkeletalMeshComponent NPCMesh;

var(NPC) class<AIController> NPCController;

simulated event PostBeginPlay()

{

   if(NPCController != none)

   {

      //set the existing ControllerClass to our new NPCController class

      ControllerClass = NPCController;

   }

   Super.PostBeginPlay();

}

//override to do nothing

simulated function SetCharacterClassFromInfo(class<UTFamilyInfo> Info)

{

}

defaultproperties 

{

   //Setup default NPC mesh

   Begin Object Class=SkeletalmeshComponent Name=NPCMesh0

      SkeletalMesh=SkeletalMesh’B_Characters.GiacomettiFemale’

      PhysicsAsset=PhysicsAsset’B_Characters.GiacomettiFemale_Physics’

      AnimSets(0)=AnimSet’B_Characters.GiacomettiFemale_Anims’

      AnimtreeTemplate=AnimTree’B_Characters.GiacomettiFemaleAnimTree’{

   End Object

   NPCMesh=NPCMesh0

   Mesh=NPCMesh0

   Components.Add(NPCMesh0)

   //Points to your custom AIController class – as the default value

   NPCController=class’Engine.AIController’

}

 //defaultMesh=SkeletalMesh’B_Characters.GiacomettiFemale’

  //    defaultPhysicsAsset=PhysicsAsset’B_Characters.GiacomettiFemale_Physics’

   //   defaultAnimSet(0)=AnimSet’B_Characters.GiacomettiFemale_Anims’

   //   defaultAnimTree=AnimTree’B_Characters.GiacomettiFemaleAnimTree’