CustomPawn Unreal code

class CustomPawn5 extends UTPawn;

// members for the custom mesh

var SkeletalMesh defaultMesh;

var MaterialInterface defaultMaterial0;

var AnimTree defaultAnimTree;

var array<AnimSet> defaultAnimSet;

var AnimNodeSequence defaultAnimSeq;

var PhysicsAsset defaultPhysicsAsset;

simulated function SetCharacterClassFromInfo(class<UTFamilyInfo> Info)

{

Mesh.SetSkeletalMesh(defaultMesh);

Mesh.SetMaterial(0,defaultMaterial0);

Mesh.SetPhysicsAsset(defaultPhysicsAsset);

Mesh.AnimSets=defaultAnimSet;

Mesh.SetAnimTreeTemplate(defaultAnimTree);

}

defaultproperties

{

defaultMesh=SkeletalMesh’squig.squig’

defaultAnimTree=AnimTree’CH_AnimHuman_Tree.AT_CH_Human’

defaultAnimSet(0)=AnimSet’CH_AnimHuman.Anims.K_AnimHuman_BaseMale’

defaultPhysicsAsset=PhysicsAsset’CH_AnimCorrupt.Mesh.SK_CH_Corrupt_Male_Physics’

Begin Object Name=WPawnSkeletalMeshComponent

AnimTreeTemplate=AnimTree’CH_AnimHuman_Tree.AT_CH_Human’

End Object

}