I made a shape in 3ds Max with one bone and I gave it an animation. I exported it and imported to UDK. When I shoot to that shape, I want my animation to start playing.

How can I do this?


If I understood you correctly, your object needs to play some animations when something happens for it.

In UDK, to have some animations, you need to make an AnimTree and AnimSet node for that object (SkeletonMesh).

For Playing animations that aren't usually for loop ( like: dying, reloading weapon, opening a door, ...), you should ensure you have a AnimNodeSlot in your AnimTree as below:

enter image description here

This node should place right after your BaseNode and other part of your tree should place next to this node.

Next step go to UnrealScript.

First you should get access to this AnimNodeSlot whith its name :

var AnimNodeSlot slot;
simulated event PostInitAnimTree(SkeletalMeshComponent SkelComp)
    mySlot = AnimNodeSlot ( Mesh.FindAnimNode('mySlotName')) ;

And Finally you should select an animation from your AnimSet node with its name to play, as follow:

mySlot.PlayCustomAnim('YourAnimationName', ... )

It's Done. Hope makes sense :)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.