Apply animation to a playermodel

I have an animation but I can’t seem to be able to use it on playermodels.
I’ve tried to compile it as a playermodel with an actual valve playermodel, but it shows an error inside the game.
So what’s the best way I can do this•?
I would prefer without an extra addon and something that actually works on all models but maybe it isn’t possible, in that case tell me.
Thanks in advance•!

Care to post QC? The problem could be that you didn’t include the animation in it.


The animation is “quique.smd” and that’s what I’ve added in the qc:
$Sequence “quique” {
activity “ACT_quique” 1
fadein 0.2
fadeout 0.2
fps 30

What error does it show in game and how are you trying to view the animation? If the SMD file is in the anims folder (in this case “male_01_anims”) then it should work, are you using the easy animation tool? ( I recommend you install it and see if the ragdoll of the playermodel has said animation.

I made the model I’ve compiled a playable player model and it’s an error. But our real problem is how to use it. We made a kick script and we’d like to active the animation when the player kicks (since it’s a kick animation) and no we haven’t used extra addons. We’re trying to make our gamemode and addons ourselves.

I just tried with the addons you told me about and the animation works, but this still doesn’t solve the problem :confused:

Well, it seems like you don’t even need to add the kick animation in the playermodel, since you can make it an animation using the valve biped skeleton and apply it to all playermodels that use it, also, WHAT? The playermodel in of itself it an error? I’ve got a few ideas, it MIGHT be the LODs, since I doubt you made 6 other models for that, more specifically these lines:

$LOD 9
	replacemodel "male_01_reference.smd" "male_01_body0_model0_lod1.smd"
$LOD 18
	replacemodel "male_01_reference.smd" "male_01_body0_model0_lod2.smd"
$LOD 32
	replacemodel "male_01_reference.smd" "male_01_body0_model0_lod3.smd"
$LOD 48
	replacemodel "male_01_reference.smd" "male_01_body0_model0_lod4.smd"
$LOD 64
	replacemodel "male_01_reference.smd" "male_01_body0_model0_lod5.smd"
	replacemodel "male_01_reference.smd" "male_01_body0_model0_lod6.smd"

I am sure you can just remove them, if that’s not the problem then you should consider watching a tutorial on how to make playermodels, but looking at what you want to do, I don’t even think that’s necessary.

We just want to use the kick animation when the player uses the action “kick” (a script we made). Like is there any code line or something that uses a sequence or something ?

[editline]19th August 2017[/editline]

The only solution we found was to replace an “act” and use it as a command in game. That’s what the wiki recommands. But how do we replace an act ?

To replace an act would be a mess, borderline impossible if I think about it, is the script you made in Lua? if you’re proficent enough in lua I am sure you can code something that will play an animation to any playermodel instead of having a playermodel play out one of his own SEQUENCES.

I’m not the programmer, but yes. They made the scripts in lua. The kick works, but still is the problem of how to add the animation

I am deadly scared that this might be more than we can chew, I downloaded and decompiled the “Prone” mod to see how they acted the animations, and they added them to their own m_anm.mdl, now, wouldn’t be a problem if I haven’t been trying for weeks to recompile a modified m_anm.mdl, all I can say is that if the animation can be played with the easy animation tool, then all you need to do is fix the model being an error, but then you would be able to kick only with that model, I can’t help you anymore as I need help myself and NOONE ANSWERS MY POSTS. Good luck.

And how may I use that model ?

Seeing the QC everything looks alright, so I don’t know what the problem is.

Does anyone know, in this forum, how to add a custom animation to a player ?? Come on guys