So i created my character and Scripted some code for it .
But ingame , the character "floats" above ground , and just disappears when destroyed/killed. So No Rag-doll Effect Whatsoever
I have checked His Physics asset And Every thing is Normal .
WHY AM I Posting Here ? this is content creation not script
actually i think i have to do something in script because my character is a UDKPawn not UTPawn So i might be doing something wrong.
Character complete CODE :
Code:class MM_Trooper extends UDKPawn placeable; /**Color coding for pawns*/ var(MassMayhem) int ColorCode; /**Side Coding for pawns*/ var int SideCode; /**Used to give different sides Materials */ var MaterialInterface FactionMaterials[2]; simulated function PostBeginPlay() { super.PostBeginPlay(); SetColors(ColorCode); CreateInventory( class 'Bob.MM_Ar' , False ); self.SetPhysics(PHYS_Falling); } function SetColors(int ColorCodeNumber) { if(ColorCode == 0) { Mesh.SetMaterial(0 , FactionMaterials[0]); Mesh.SetMaterial(1 , FactionMaterials[0]); } if(ColorCode == 1) { Mesh.SetMaterial(0 , FactionMaterials[0]); Mesh.SetMaterial(1 , FactionMaterials[0]); } if(ColorCode == 2) { Mesh.SetMaterial(0 , FactionMaterials[1]); Mesh.SetMaterial(1 , FactionMaterials[1]); } } DefaultProperties { Begin Object Name=CollisionCylinder CollisionHeight=+44.000000 end object Begin Object class=SkeletalMeshComponent Name=MMSkeletalMesh SkeletalMesh=SkeletalMesh'MassMayhem.SkeletalMesh.Trooper' AnimSets(0)=AnimSet'MassMayhem.Anims.MM_anim_Human' AnimTreeTemplate=AnimTree'MassMayhem.AnimTree.Human_Trooper' PhysicsAsset=PhysicsAsset'MassMayhem.PhysicAsset.Trooper_Physics' HiddenGame=false HiddenEditor=FALSE bOverrideAttachmentOwnerVisibility=true End Object Mesh=MMSkeletalMesh Components.Add(MMSkeletalMesh) bJumpCapable=false bCanJump=false GroundSpeed=300.0 FactionMaterials[0] = Material'MassMayhem.Materials.Trooper_Material_RED' FactionMaterials[1] = Material'MassMayhem.Materials.Trooper_Material_BLUE' InventoryManagerClass = class'Bob.MM_InventoryManager' ControllerClass = Class'Bob.MM_Trooper_AI' }



Reply With Quote

Bookmarks