Custom model won't animate?

Avatar
CamBen
973 Posts
Posted Jan 07, 2014
So I finally put my modeling skill to some actual use and was trying to animate a viewmodel I made for a custom weapon. The animations work fine in hammer and model viewer, but ingame they have just a static animation, no matter which animation is being used.

I have attached the QC as well as the texture and model files to try out in portal 2, if anyone is interested. Sorry for all the multiple problems with modeling that I've been posting and requesting help on, but once i get this sorted out I should be good to go.

Thanks.

Attachments
Model.zip
0.36 MB 25 downloads
Advertisement
Registered users don’t see ads! Register now!
Avatar
Skotty
671 Posts
Posted Jan 07, 2014
Replied 9 hours later
Probably those ACT_ constants are wrong. Hammer and Modelviewer don't care about them, but the game uses those to find out what sequence to play. I'm pretty sure this is a decompiled model (at least that QC file is from there) and I know that the usual decompiler likes to at least create some errors in animation parts of the qc. Maybe some things weren't decompiled correct.
Avatar
CamBen
973 Posts
Posted Jan 07, 2014
Replied 4 hours later
It is a decompiled QC, yes, but the ACT_ names are all from the portal gun. The actual model is made completely from scratch. The ones that aren't from the portal gun don't work, and neither do the ones that are. The animations only seem to work when I modify the weapon_portalgun text file and make it be a portalgun model.
Avatar
Skotty
671 Posts
Posted Jan 07, 2014
Replied 42 minutes later

CamBen wrote:
The animations only seem to work when I modify the weapon_portalgun text file and make it be a portalgun model.

There you have your answer. Those ACT_ constants are depending on what entity type uses this model. If it is weapon_portalgun, then it uses those ACT_VM_ constants. Other weapons use other ACT_ constants. Take a look into Valve Wiki for other constants.

Advertisement
Registered users don’t see ads! Register now!
Avatar
CamBen
973 Posts
Posted Jan 07, 2014
Replied 1 hour later

Skotty wrote:
CamBen wrote:

The animations only seem to work when I modify the weapon_portalgun text file and make it be a portalgun model.

There you have your answer. Those ACT_ constants are depending on what entity type uses this model. If it is weapon_portalgun, then it uses those ACT_VM_ constants. Other weapons use other ACT_ constants. Take a look into Valve Wiki for other constants.

Oooh. Thank you.

Although I still don't get why I'm able to use the portalgun viewmodel in a map but not the custom one...

Anyway, yea, I'll check that out.