[CS:S] how to change player model pose/animation?

Please post any questions about developing your plugin here. Please use the search function before posting!
derkalle
Junior Member
Posts: 9
Joined: Sat Nov 26, 2022 4:49 pm

[CS:S] how to change player model pose/animation?

Postby derkalle » Sun Nov 27, 2022 6:37 pm

Hi everyone,

I am currently looking more deeply into changing stuff on Counter-Strike:Source including the ability to change the hostages model. Normally you find a lot of models online but they all have a default pose where one does hold a weapon. I know there should be multiple animations a player model does have so I wonder if it is possible to change the pose to match a hostage better?

I have looked into sourcemod stuff but do not quite understand them to have a solution for Source.Python. There are parameters like m_flPoseParameter which should be able to control a model and move it (see alliedmods.net) so there is maybe something to change the model arms position.

One workaround I also thought of was to give a hostage a weapon (like a knife) and change it to something else like flowers. Would look weird but still better than empty hands in a weapon pose. Unfortunately a hostage entity is not a player model so I cannot give a weapon to a hostage.

Another workaround would be to change the mdl file and set another default pose for a given player model. But I have no clue on how to achieve that. I do not want to mess with the original mdl file but rather upload a second one with the changes applied.

Any help or ideas are highly welcomed :)

Kind Regards,
Kalle
User avatar
L'In20Cible
Project Leader
Posts: 1533
Joined: Sat Jul 14, 2012 9:29 pm
Location: Québec

Re: [CS:S] how to change player model pose/animation?

Postby L'In20Cible » Sun Nov 27, 2022 9:43 pm

derkalle wrote:I have looked into sourcemod stuff but do not quite understand them to have a solution for Source.Python. There are parameters like m_flPoseParameter which should be able to control a model and move it (see alliedmods.net) so there is maybe something to change the model arms position.

viewtopic.php?p=15656#p15656

If you write values, however, you will likely have to flag the edict as changed to ensure it is being networked to clients on the current frame:

Syntax: Select all

entity.edict.state_changed()

That said, I'm pretty sure the pose parameters only affect the legs and that the arms are sequenced and handled client-side based on the networked sequences and that there is nothing you can do server-side except editing the animations on a derived model.
derkalle
Junior Member
Posts: 9
Joined: Sat Nov 26, 2022 4:49 pm

Re: [CS:S] how to change player model pose/animation?

Postby derkalle » Mon Nov 28, 2022 5:24 pm

Many thanks for the fast reply!

Seems it is not possible to change it via some commands in-game. So I will have to modify the mdl file somehow and make myself familiar on how to do that!

Return to “Plugin Development Support”

Who is online

Users browsing this forum: Bing [Bot] and 20 guests