Help on Animation scripting

Hey guys, can anyone give me the basics on how to make a Combat idle animation, Currently i have a script that if u Click Q you activate Combat mode and u left click to attack, I want to have a Idle animation for combat, How would i make something like this without interrupting the other animations? like Run, Jump, Walk Etc?

2 Likes

Assuming that you understand how to make your own animations using the AnimationEditor, all you really need to worry about is the animation’s priority and which parts of the character the animation affects.

The priority of an animation determines how important it is. For example, an animation with a higher priority value will take precedence over an animation with a lower priority value. There are 4 levels of animation priority (lowest to highest): Core, Idle, Movement, Action. To set animation priorities, you can either do it through the AnimationEditor itself (while editing your animation) or through the script from which you are playing the animation. I suggest you read the following articles for more details.

Every animation (including the Walk, Run, Jump animations) has its own priority value. Keep this in mind while programming your priorities.

On top of priority, you also have to take into account the different parts being animated in your script. If you have an animation strictly for the Right Leg, for example, you want to make sure you’re only animating the right leg of the character. Animating any other part can cause overlap in your animation system and cause rigid movement in your character.

I hope this helps. Let me know if you have any further questions.

Sure so like, How would i end up making the code idle, cause i have the animation idle on loop when the person is still but the animation continues to load if i try running how would i fix this?

In this case, you would want to stop the animation once the player starts moving.
This problem has been solved in another post, and I think the solution is very good. Check out