Left 4 Dead 2

Left 4 Dead 2

View Stats:
Karakondžula Jun 10, 2017 @ 12:37pm
Creating a melee weapon, view model not showing
I've been trying to create a custom melee weapon, and I've been following Splinks's tutorial on the process.
I'm trying to replace the guitar model with a custom model I made, and the world model came out fine.

http://steamcommunity.com/sharedfiles/filedetails/?id=944020458

However, when I equip this weapon, the view model doesn't appear. Not only that, but the survivor arms dissapear as well, although I can still use the weapon like usual.

http://steamcommunity.com/sharedfiles/filedetails/?id=944020535

I'm not sure what could cause a problem like this because both my .vtf/.vmt and .smd files are in place.
It's probably something regarding animations, but I'm not well versed into the whole process so any help would be welcome :)


Here is the WIP of the model so you can see for yourself[www.sendspace.com]
Last edited by Karakondžula; Jun 10, 2017 @ 12:40pm
< >
Showing 1-10 of 10 comments
Well, if those disappear I can already think of one thing, but does the camera start rotating strangely when the weapon is equipped as well? Also, did you check to make sure the v_model animations look alright in HLMV?
Karakondžula Jun 10, 2017 @ 1:48pm 
Originally posted by Tiny King Trashmouth:
Well, if those disappear I can already think of one thing, but does the camera start rotating strangely when the weapon is equipped as well? Also, did you check to make sure the v_model animations look alright in HLMV?

That problem actually happened to me before with this, but I managed to fix it.

I haven't been able to check the model in HLMV because I honestly don't have a clue on how to use it. Whenever I try to load the .mdl of my mod it displays the "Error Loading Model" message.
Originally posted by Kita u bila:
That problem actually happened to me before with this, but I managed to fix it.

I haven't been able to check the model in HLMV because I honestly don't have a clue on how to use it. Whenever I try to load the .mdl of my mod it displays the "Error Loading Model" message.
Well that's one thing out of the way then; To preview your model in HLMV, change the $modelname line so that it isn't using the same directory. In this case, change "v_models/weapon.mdl" to "v_model/weapon.mdl" or something. Don't compile it into a folder, though. After, click use in view & it should pop up.
Karakondžula Jun 10, 2017 @ 2:04pm 
Originally posted by Tiny King Trashmouth:
Well that's one thing out of the way then; To preview your model in HLMV, change the $modelname line so that it isn't using the same directory. In this case, change "v_models/weapon.mdl" to "v_model/weapon.mdl" or something. Don't compile it into a folder, though. After, click use in view & it should pop up.

Thanks for the tip on that!
I've loaded both the world and view model just in case and both of them seem to show up with all their textures, so the .mdl doesn't seem to have any errors.

EDIT: Also decided to load a survivor and the model itself to see if the animations are working and they actually do work as expected, so I'm stumped now lol
Last edited by Karakondžula; Jun 10, 2017 @ 2:09pm
Originally posted by Kita u bila:

Thanks for the tip on that!
I've loaded both the world and view model just in case and both of them seem to show up with all their textures, so the .mdl doesn't seem to have any errors.
You should check the animations/sequences for the view model; From what I can tell, the animations (or at least the ones meant to actually play ingame) became screwy leading to it not showing up properly ingame. This would also explain why the arms are missing.

EDIT: Scrach that, I checked it myself, the animations & everything are fine, but... they're all pushed down extremely low from the actual viewmodel camera, for some reason?
EDIT2: Found your problem I believe. Remove the $origin lines from your .qc & you should be good to go.
Last edited by Tiny King Trashmouth; Jun 10, 2017 @ 2:14pm
Karakondžula Jun 10, 2017 @ 2:22pm 
Originally posted by Tiny King Trashmouth:
You should check the animations/sequences for the view model; From what I can tell, the animations (or at least the ones meant to actually play ingame) became screwy leading to it not showing up properly ingame. This would also explain why the arms are missing.
EDIT: Scrach that, I checked it myself, the animations & everything are fine, but... they're all pushed down extremely low from the actual viewmodel camera, for some reason?
EDIT2: Found your problem I believe. Remove the $origin lines from your .qc & you should be good to go.

LMAO I knew it was something simple.
Removed the lines and the view model now shows up. Thanks a lot!
Karakondžula Jun 10, 2017 @ 4:22pm 
Decided to use this thread again instead of making a new one, but I have a minor issue with the mod. When a survivor is holding the guitar, the right hand seems to clip through the model when looking up or down.

http://steamcommunity.com/sharedfiles/filedetails/?id=944167405

Is there a fix to this?
Originally posted by Kita u bila:
Decided to use this thread again instead of making a new one, but I have a minor issue with the mod. When a survivor is holding the guitar, the right hand seems to clip through the model when looking up or down.

-snip-

Is there a fix to this?
As for this, I've never seen it myself, so I wouldn't really know how to fix this at all. Perhaps look into the look_poses sequence or related?
Karakondžula Jun 11, 2017 @ 9:42am 
Hopefully constantly asking for help won't become a habit lol

Anyway, I managed to fix the previous bug somehow by editing the .qc file, but I noticed one more problem that's stopping me from finishing the mod.

When other survivors pick up the guitar, instead of it appearing in their arms, it instead attaches itself to the root of the model like in this picture.

http://steamcommunity.com/sharedfiles/filedetails/?id=944695999

REALLY stumped on this one. I've also uploaded the current version of mod for checking here[www.sendspace.com]
Last edited by Karakondžula; Jun 11, 2017 @ 9:43am
Karakondžula Jun 12, 2017 @ 9:32am 
Bump
< >
Showing 1-10 of 10 comments
Per page: 1530 50

Date Posted: Jun 10, 2017 @ 12:37pm
Posts: 10