Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

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)
{
    super.PostInitAnimTree(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 :)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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