PDA

View Full Version : [Kismet Help] Actor didn't move



jjobby
11-18-2009, 02:52 PM
I want to do a simple script. I want to spawn actor at pathnode and that spawned actor will move to another pathnode.

I've copied code and created CustomPawn class from tutorial which was posted somewhere in this forum. (Sorry, can't remember) This is the code.


class CustomPawn extends UTPawn
placeable;

// 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'UTExampleCrowd.Mesh.SK_Cr owd_Robot'
defaultAnimTree=AnimTree'CH_AnimHuman_Tree.AT_CH_H uman'
defaultAnimSet(0)=AnimSet'CH_AnimHuman.Anims.K_Ani mHuman_BaseMale'
defaultPhysicsAsset=PhysicsAsset'CH_AnimCorrupt.Me sh.SK_CH_Corrupt_Male_Physics'

Begin Object Name=WPawnSkeletalMeshComponent
SkeletalMesh=SkeletalMesh'UTExampleCrowd.Mesh.SK_C rowd_Robot'
AnimTreeTemplate=AnimTree'CH_AnimHuman_Tree.AT_CH_ Human'
End Object
}

This is my kismet setup.

http://img132.imageshack.us/img132/7473/kismet.th.jpg (http://img132.imageshack.us/i/kismet.jpg/)

I've used UTActorFactoryAI in Actor Factory to create my CustomPawn class. It could spawn the actor but the actor was just standing there and didn't move at all. Plus, the actor's feet didn't align with the floor too. It stood in the air. Can someone tell me what's the problem here?