views:

123

answers:

2

I'm porting UT3 code to UDK, and I am getting the following compile error with the UDK compiler:

C:\UDK\UDK-2010-03\Development\Src\FixIt\Classes\ZPawn.uc(25) : Error, 'DefaultMesh': Bad command or expression

The ZPawn class extends UTPawn.

Line 25 is the following:

DefaultMesh = SkeletalMesh(DynamicLoadObject(ZBotOwner(Owner).MeshToUse, class'SkeletalMesh'));

Where did DefaultMesh go in UDK?

+1  A: 

The SkeletalMesh is part of the Mesh Component in a Pawn:

Begin Object Class=SkeletalMeshComponent  name=Mesh01
    SkeletalMesh=SkeletalMesh'pawnPackage.Meshes.mySkeletalMesh'
    AnimTreeTemplate=AnimTree'pawnPackage.Anims.myAnimTree'
    PhysicsAsset=PhysicsAsset'pawnPackage.Physics.myPhysicsAsset'
    AnimSets(0) =AnimSet'pawnPackage.Anims.myAnimSet'             
End Object
Mesh=Mesh01
Components.Add(Mesh01)
MSeverin
A: 

Well just to be clear, the line change you will want will be this:

Mesh = SkeletalMesh(DynamicLoadObject(ZBotOwner(Owner).MeshToUse, class'SkeletalMesh'));

Assuming of course your ZBot is all set up correctly. Also I'm assumign that this is in default properties? Don't forget to add it to your components

Components.Add(Mesh);
David Frenkel