• NPC always holding invisible weapon
    9 replies, posted
Alright Silver Spirit recently made me some npc's out of ragdolls (niko and roman) and they both work fine apart from this: [img]http://img257.imageshack.us/img257/7899/csoffice0000.jpg[/img] He is ALWAYS holding this invisible weapon, even when no weapon is selected. I've also tried making him equip other weapons but this doesn't make much difference (except the smg which helps a fair bit but not completely) We haven't been able to figure out how to fix this so far. Does anyone have any suggestions? Thanks :)
Just incase its needed this is the QC file [code] $modelname "player\niko\niko_bellic\niko_npc.mdl" $model "S-LoW" "slow.smd" $poseparameter move_yaw -180.00 180.00 360.00 $poseparameter body_pitch -90.00 90.00 360.00 $poseparameter body_yaw -90.00 90.00 360.00 $cdmaterials "models\player\niko\niko_bellic\" $hboxset "cstrike" $hbox 3 "ValveBiped.Bip01_Pelvis" -8.300 -7.730 -5.430 8.300 2.010 6.580 $hbox 6 "ValveBiped.Bip01_L_Thigh" 4.580 -5.380 -3.430 22.880 3.780 4.580 $hbox 6 "ValveBiped.Bip01_L_Calf" -0.290 -4.300 -3.430 20.880 3.150 3.430 $hbox 6 "ValveBiped.Bip01_L_Foot" -2.290 -1.140 -2.580 5.720 4.580 2.010 $hbox 6 "ValveBiped.Bip01_L_Toe0" -2.860 -2.810 -2.860 4.000 1.200 1.720 $hbox 7 "ValveBiped.Bip01_R_Thigh" 4.580 -5.380 -3.430 22.880 3.780 4.580 $hbox 7 "ValveBiped.Bip01_R_Calf" -0.290 -4.300 -3.430 20.880 3.150 3.430 $hbox 7 "ValveBiped.Bip01_R_Foot" -2.290 -1.140 -2.010 5.720 4.580 2.580 $hbox 7 "ValveBiped.Bip01_R_Toe0" -2.860 -2.810 -1.720 4.000 1.200 2.860 $hbox 3 "ValveBiped.Bip01_Spine1" -9.150 -1.260 -8.010 4.580 11.330 8.010 $hbox 2 "ValveBiped.Bip01_Spine2" -3.070 -3.430 -9.690 13.570 10.320 9.690 $hbox 1 "ValveBiped.Bip01_Neck1" -0.100 -4.580 -2.860 5.510 2.290 2.860 $hbox 1 "ValveBiped.Bip01_Head1" -0.420 -6.240 -3.410 9.360 4.440 3.250 $hbox 4 "ValveBiped.Bip01_L_UpperArm" -1.140 -2.580 -2.290 14.870 2.580 2.290 $hbox 4 "ValveBiped.Bip01_L_Forearm" -1.720 -2.400 -2.400 13.160 2.400 2.400 $hbox 4 "ValveBiped.Bip01_L_Hand" 0.290 -2.460 -1.720 6.580 1.550 2.860 $hbox 5 "ValveBiped.Bip01_R_UpperArm" -1.140 -2.580 -2.290 14.870 2.580 2.290 $hbox 5 "ValveBiped.Bip01_R_Forearm" -1.720 -2.400 -2.400 13.160 2.400 2.400 $hbox 5 "ValveBiped.Bip01_R_Hand" 0.290 -2.460 -2.860 6.580 1.550 1.720 // Model uses material "niko_shoes.vmt" // Model uses material "niko_hair.vmt" // Model uses material "niko_fingernails.vmt" // Model uses material "niko_hands.vmt" // Model uses material "niko_head.vmt" // Model uses material "niko_eyes.vmt" // Model uses material "niko_jacket.vmt" // Model uses material "niko_teeth.vmt" // Model uses material "niko_pants.vmt" $attachment "forward" "ValveBiped.forward" 0.00 -0.00 -0.00 rotate 0.00 0.00 -0.00 $attachment "grenade0" "ValveBiped.Bip01_Pelvis" 7.45 4.24 -3.33 rotate -13.05 173.19 92.40 $attachment "grenade1" "ValveBiped.Bip01_Pelvis" 2.13 4.48 -6.15 rotate -81.11 178.93 91.12 $attachment "grenade2" "ValveBiped.Bip01_Pelvis" -7.50 3.33 2.16 rotate 22.39 2.47 -86.84 $attachment "grenade3" "ValveBiped.Bip01_Pelvis" -7.89 4.44 -4.03 rotate -33.13 -2.70 -87.60 $attachment "pistol" "ValveBiped.Bip01_R_Thigh" -0.93 4.33 -4.60 rotate 0.00 -2.00 90.00 $attachment "defusekit" "ValveBiped.Bip01_Pelvis" 0.00 1.22 -6.66 rotate -73.06 90.93 179.75 $attachment "primary" "ValveBiped.Bip01_Spine2" 13.03 -5.00 -7.48 rotate -17.00 -177.00 -4.00 $attachment "eholster" "ValveBiped.Bip01_L_Thigh" 5.15 -0.56 5.20 rotate 3.68 -91.56 99.67 $attachment "c4" "ValveBiped.Bip01_Spine2" 13.67 -7.55 0.95 rotate -29.12 65.25 22.32 $attachment "lfoot" "ValveBiped.Bip01_L_Foot" -0.00 5.20 -0.00 rotate -0.00 0.00 -0.00 $attachment "rfoot" "ValveBiped.Bip01_R_Foot" 0.00 5.20 -0.00 rotate 0.00 -0.00 0.00 $attachment "muzzle_flash" "ValveBiped.Bip01_L_Hand" -0.00 -0.00 0.00 rotate 0.00 -0.00 -0.00 $attachment "eyes" "ValveBiped.Bip01_Head1" 3.67 -4.32 0.00 rotate -0.00 -80.10 -90.00 $attachment "mouth" "ValveBiped.Bip01_Head1" 1.00 -6.50 0.00 rotate 0.00 -80.00 -90.00 $attachment "chest" "ValveBiped.Bip01_Spine2" 5.00 4.00 0.00 rotate 0.00 90.00 90.00 $attachment "anim_attachment_RH" "ValveBiped.Bip01_R_Hand" 2.68 -1.71 -0.00 rotate -0.00 0.00 180.00 $attachment "anim_attachment_LH" "ValveBiped.Bip01_L_Hand" 2.68 -1.71 0.00 rotate 0.00 0.00 -0.00 $attachment "anim_attachment_head" "ValveBiped.Bip01_Head1" -0.00 -0.00 0.00 rotate -90.00 -90.00 0.00 $includemodel "humans/male_shared.mdl" $includemodel "humans/male_ss.mdl" $includemodel "humans/male_gestures.mdl" $includemodel "humans/male_postures.mdl" $includemodel "player/male_anims.mdl" $includemodel "player/cs_player_shared.mdl" $includemodel "player/ak_anims_ct.mdl" $includemodel "cs_fix.mdl" $includemodel "m_anm.mdl" $includemodel "m_gst.mdl" $includemodel "m_pst.mdl" $includemodel "m_shd.mdl" $includemodel "m_ss.mdl" $surfaceprop "flesh" $eyeposition 0.000 0.000 150.000 $illumposition -0.019 0.305 37.327 $sequence ragdoll "ragdoll" ACT_DIERAGDOLL -1 fps 30.00 $sequence gmod_ragdoll "gmod_ragdoll" fps 30.00 $ikchain rhand ValveBiped.Bip01_R_Hand knee 0.707 0.707 0.000 $ikchain lhand ValveBiped.Bip01_L_Hand knee 0.707 0.707 0.000 $ikchain rfoot ValveBiped.Bip01_R_Foot knee 0.707 -0.707 0.000 $ikchain lfoot ValveBiped.Bip01_L_Foot knee 0.707 -0.707 0.000 $ikchain ikclip ValveBiped.weapon_bone_Clip knee 0.707 -0.707 0.000 $collisionjoints "phymodel.smd" { $mass 90.0 $inertia 10.00 $damping 0.01 $rotdamping 1.50 $rootbone "valvebiped.bip01_pelvis" $jointmerge "ValveBiped.Bip01_Pelvis" "ValveBiped.Bip01_Spine1" $jointconstrain "valvebiped.bip01_spine2" x limit -48.00 48.00 0.00 $jointconstrain "valvebiped.bip01_spine2" y limit -25.00 25.00 0.00 $jointconstrain "valvebiped.bip01_spine2" z limit -25.00 50.00 0.00 $jointconstrain "valvebiped.bip01_r_upperarm" x limit -39.00 39.00 0.00 $jointconstrain "valvebiped.bip01_r_upperarm" y limit -79.00 95.00 0.00 $jointconstrain "valvebiped.bip01_r_upperarm" z limit -93.00 23.00 0.00 $jointconstrain "valvebiped.bip01_l_upperarm" x limit -30.00 30.00 0.00 $jointconstrain "valvebiped.bip01_l_upperarm" y limit -95.00 84.00 0.00 $jointconstrain "valvebiped.bip01_l_upperarm" z limit -86.00 26.00 0.00 $jointconstrain "valvebiped.bip01_l_forearm" x limit 0.00 0.00 0.00 $jointconstrain "valvebiped.bip01_l_forearm" y limit 0.00 0.00 0.00 $jointconstrain "valvebiped.bip01_l_forearm" z limit -149.00 4.00 0.00 $jointconstrain "valvebiped.bip01_l_hand" x limit -37.00 37.00 0.00 $jointconstrain "valvebiped.bip01_l_hand" y limit 0.00 0.00 0.00 $jointconstrain "valvebiped.bip01_l_hand" z limit -57.00 59.00 0.00 $jointconstrain "valvebiped.bip01_r_forearm" x limit 0.00 0.00 0.00 $jointconstrain "valvebiped.bip01_r_forearm" y limit 0.00 0.00 0.00 $jointconstrain "valvebiped.bip01_r_forearm" z limit -149.00 4.00 0.00 $jointconstrain "valvebiped.bip01_r_hand" x limit -60.00 60.00 0.00 $jointconstrain "valvebiped.bip01_r_hand" y limit 0.00 0.00 0.00 $jointconstrain "valvebiped.bip01_r_hand" z limit -57.00 70.00 0.00 $jointconstrain "valvebiped.bip01_r_thigh" x limit -12.00 12.00 0.00 $jointconstrain "valvebiped.bip01_r_thigh" y limit -8.00 75.00 0.00 $jointconstrain "valvebiped.bip01_r_thigh" z limit -97.00 32.00 0.00 $jointconstrain "valvebiped.bip01_r_calf" x limit 0.00 0.00 0.00 $jointconstrain "valvebiped.bip01_r_calf" y limit 0.00 0.00 0.00 $jointconstrain "valvebiped.bip01_r_calf" z limit -12.00 126.00 0.00 $jointconstrain "valvebiped.bip01_head1" x limit -20.00 20.00 0.00 $jointconstrain "valvebiped.bip01_head1" y limit -25.00 25.00 0.00 $jointconstrain "valvebiped.bip01_head1" z limit -13.00 30.00 0.00 $jointconstrain "valvebiped.bip01_l_thigh" x limit -12.00 12.00 0.00 $jointconstrain "valvebiped.bip01_l_thigh" y limit -73.00 6.00 0.00 $jointconstrain "valvebiped.bip01_l_thigh" z limit -93.00 30.00 0.00 $jointconstrain "valvebiped.bip01_l_calf" x limit 0.00 0.00 0.00 $jointconstrain "valvebiped.bip01_l_calf" y limit 0.00 0.00 0.00 $jointconstrain "valvebiped.bip01_l_calf" z limit -8.00 126.00 0.00 $jointconstrain "valvebiped.bip01_l_foot" x limit 0.00 0.00 0.00 $jointconstrain "valvebiped.bip01_l_foot" y limit -19.00 19.00 0.00 $jointconstrain "valvebiped.bip01_l_foot" z limit -15.00 35.00 0.00 $jointconstrain "valvebiped.bip01_r_foot" x limit 0.00 0.00 0.00 $jointconstrain "valvebiped.bip01_r_foot" y limit -25.00 6.00 0.00 $jointconstrain "valvebiped.bip01_r_foot" z limit -15.00 35.00 0.00 $animatedfriction 1.000 400.000 0.500 0.300 0.000 } [/code] (and I only did Niko, Roman was set up already.)
[code]$ikchain ikclip ValveBiped.weapon_bone_Clip knee 0.707 -0.707 0.000 [/code] Delete that line in the qc and It will work fine. The weapons are not invisible, they are under the NPC's feet.
[QUOTE=ShoTGuNGuY49;16678368][code]$ikchain ikclip ValveBiped.weapon_bone_Clip knee 0.707 -0.707 0.000 [/code] Delete that line in the qc and It will work fine. The weapons are not invisible, they are under the NPC's feet.[/QUOTE] Ok i'll give it a go.
Awesome, thanks. I'll do that now. Spirit will it work if I just decompile the model again and remove the line and recompile? or is there something else to it lol. I'm a noob at this xD edit: Oh lol. I guess this is what being Ninja'd is xD you can try it then if you want :P edit again: I just tried it and while the weapons are being put in the right place, he still uses the hold weapon animation when no weapon is being used. not only that but the game crashes like 5 seconds after i spawn him now xD
[QUOTE=Glenneth;16678399]Awesome, thanks. I'll do that now. Spirit will it work if I just decompile the model again and remove the line and recompile? or is there something else to it lol. I'm a noob at this xD edit: Oh lol. I guess this is what being Ninja'd is xD you can try it then if you want :P[/QUOTE] Ninja'd? And yes that will work if you decompile and recompile it. Though I just tested it and it made no difference but then mine have weapons sticking out of their shoulders and are perminantely stuck with the arms by their sides (no matter what weapon) [img] http://fc09.deviantart.com/fs49/f/2009/224/e/1/e1201a2ce95144c7bd93325fb5fd70c2.jpg [/img] Same as before (image is from before but the change in the QC made no difference to this).
Try getting rid of... [code]$includemodel "player/cs_player_shared.mdl" $includemodel "player/ak_anims_ct.mdl" [/code]
Yeah that worked :) thanks very much! It fixed the invisible gun error when unarmed but it doesn't work properly with some guns - this doesn't bother me though as it's for a machinima, and if we need them to use weapons we'll just use player models anyway. Thanks again guys :)
[QUOTE=ShoTGuNGuY49;16678767]Try getting rid of... [code]$includemodel "player/cs_player_shared.mdl" $includemodel "player/ak_anims_ct.mdl" [/code][/QUOTE] Ah good i'll do that too then :D [QUOTE=Glenneth;16678776]Yeah that worked :) thanks very much! It fixed the invisible gun error when unarmed but it doesn't work properly with some guns - this doesn't bother me though as it's for a machinima, and if we need them to use weapons we'll just use player models anyway. Thanks again guys :)[/QUOTE] Glad you got it fixed ^^
Yep :) thanks for all your help!
Sorry, you need to Log In to post a reply to this thread.