|
|
#1 |
![]() Join Date: Jan 2011
Reputation: 0
Posts: 29
|
Unwanted duplicate headcrab
Hey everyone. I made a custom zombie, with a new head attachment. The model is a robot with a head that you should be able to shoot off just like the headcrab. The attachment works, and the head spawns in the right place. I also have it popping off and rolling around when it's shot off.
The only problem is, the attachment head stays in place instead of disappearing. So the visual effect is a duplicate head flying off when the robot dies, since his attached head remains in place and collapses with the rest of the dead bot. Is there something I'm missing in the C code someplace? Or could my attachment be wrong in the QC? Thanks for stopping by - any advice would be greatly appreciated. Here's my QC: Code:
$modelname "bots\biped_bot_a.mdl"
$scale 1
$surfaceprop "metal"
$eyeposition -0.000 0.000 64.000
$illumposition 2.542 -0.000 36.531
$poseparameter move_yaw -180.00 180.00 360.00
$cdmaterials "bots"
$model "studio" "biped_bot_a.smd"
$model "headcrab1" "biped_bot_a_head.smd"
$lod 25
{
replacemodel "biped_bot_a" "lod1_biped_bot_a"
// replacemodel "biped_bot_a_head" "lod1_biped_bot_a_head"
}
$lod 35
{
replacemodel "biped_bot_a" "lod2_biped_bot_a"
// replacemodel "biped_bot_a_head" "lod2_biped_bot_a_head"
}
$lod 50
{
replacemodel "biped_bot_a" "lod3_biped_bot_a"
// replacemodel "biped_bot_a_head" "lod3_biped_bot_a_head"
}
$lod 60
{
replacemodel "biped_bot_a" "lod4_biped_bot_a"
// replacemodel "biped_bot_a_head" "lod4_biped_bot_a_head"
}
$shadowlod
{
replacemodel "biped_bot_a" "lod4_biped_bot_a"
// replacemodel "biped_bot_a_head" "lod4_biped_bot_a_head"
}
$include "standardhierarchy.qci"
//$include "commonbones.qci"
//$include "standardikchains.qci"
/*
$hboxset "default"
$hbox 2 "ValveBiped.Bip01_Spine1" -8.500 -3.840 -7.120 15.500 9.840 7.730
$hbox 4 "ValveBiped.Bip01_L_UpperArm" -1.000 -3.500 -2.500 11.000 3.500 2.500
$hbox 4 "ValveBiped.Bip01_L_Forearm" -0.500 -1.860 -1.900 10.500 3.110 2.360
$hbox 4 "ValveBiped.Bip01_L_Hand" 0.000 -1.780 -1.000 6.000 1.230 2.000
$hbox 5 "ValveBiped.Bip01_R_UpperArm" -1.000 -3.500 -2.500 11.000 3.500 2.500
$hbox 5 "ValveBiped.Bip01_R_Forearm" -0.500 -1.890 -1.600 10.500 3.090 2.660
$hbox 5 "ValveBiped.Bip01_R_Hand" 0.000 -1.780 -2.500 6.000 1.230 0.500
$hbox 6 "ValveBiped.Bip01_L_Thigh" 0.000 -4.000 -3.730 17.250 4.000 4.290
$hbox 6 "ValveBiped.Bip01_L_Calf" 0.000 -4.870 -3.540 17.250 3.180 2.630
$hbox 6 "ValveBiped.Bip01_L_Foot" -1.500 -2.000 -2.500 7.500 2.000 2.500
$hbox 7 "ValveBiped.Bip01_R_Thigh" 0.000 -4.000 -3.730 17.250 4.000 4.290
$hbox 7 "ValveBiped.Bip01_R_Calf" 0.000 -4.920 -3.120 17.250 3.250 2.650
$hbox 7 "ValveBiped.Bip01_R_Foot" -1.500 -2.000 -2.500 7.500 2.000 2.500
$hbox 1 "ValveBiped.HC_Body_Bone" -6.590 -5.000 -5.760 8.500 5.000 6.240
*/
$attachment "headcrab" "ValveBiped.HC_Body_Bone" -4.49 -1.32 -0.02 rotate -0.00 20.25 29.25
$sequence Idle01 "Idle01" loop ACT_IDLE 1 fps 30.00
$sequence die "Idle01" loop ACT_DIESIMPLE 1 fps 30.00
$animation a_walkS "a_walkS" loop fps 24.000000 LX LY
$animation a_walkSE "a_walkSE" loop fps 24.000000 LX LY
$animation a_walkE "a_walkE" loop fps 24.000000 LX LY
$animation a_walkNE "a_walkNE" loop fps 24.000000 LX LY
$animation a_walk1 "a_walk1" loop fps 24.000000 LX LY
$animation a_walkNW "a_walkNW" loop fps 24.000000 LX LY
$animation a_walkW "a_walkW" loop fps 24.000000 LX LY
$animation a_walkSW "a_walkSW" loop fps 24.000000 LX LY
$sequence walk "a_WalkS" loop ACT_WALK 1 fps 24.00 {
{ event AE_ZOMBIE_STEP_LEFT 1 }
{ event AE_ZOMBIE_STEP_RIGHT 2 }
{ event AE_ZOMBIE_SCUFF_LEFT 3 }
{ event AE_ZOMBIE_STEP_LEFT 4 }
{ event AE_ZOMBIE_STEP_RIGHT 5 }
{ event AE_ZOMBIE_SCUFF_LEFT 6 }
blendwidth 9
blend move_yaw -180.000000 180.000000
a_WalkSE a_WalkE a_WalkNE a_walk1 a_WalkNW a_WalkW a_WalkSW a_WalkS
}
$animation a_walk2 "a_walk2" loop fps 24.000000 LX LY
$sequence walk2 "a_walkS" loop ACT_WALK 1 fps 24.00 {
{ event AE_ZOMBIE_STEP_LEFT 1 }
{ event AE_ZOMBIE_SCUFF_RIGHT 1 }
{ event AE_ZOMBIE_STEP_RIGHT 1 }
{ event AE_ZOMBIE_STEP_LEFT 1 }
{ event AE_ZOMBIE_SCUFF_RIGHT 1 }
{ event AE_ZOMBIE_STEP_RIGHT 1 }
blendwidth 9
blend move_yaw -180.000000 180.000000
a_walkSE a_walkE a_walkNE a_walk2 a_walkNW a_walkW a_walkSW a_walkS
}
$animation a_walk3 "a_walk3" loop fps 24.000000 LX LY
$sequence walk3 "a_walkS" loop ACT_WALK 1 fps 24.00 {
{ event AE_ZOMBIE_STEP_LEFT 1 }
{ event AE_ZOMBIE_STEP_RIGHT 1 }
{ event AE_ZOMBIE_SCUFF_LEFT 1 }
{ event AE_ZOMBIE_STEP_LEFT 1 }
{ event AE_ZOMBIE_STEP_RIGHT 1 }
{ event AE_ZOMBIE_SCUFF_LEFT 1 }
blendwidth 9
blend move_yaw -180.000000 180.000000
a_walkSE a_walkE a_walkNE a_walk3 a_walkNW a_walkW a_walkSW a_walkS
}
$animation a_walk4 "a_walk4" loop fps 24.000000 LX LY
$sequence walk4 "a_walk4" loop ACT_WALK 1 fps 24.00 {
{ event AE_ZOMBIE_STEP_LEFT 1 }
{ event AE_ZOMBIE_STEP_RIGHT 1 }
{ event AE_ZOMBIE_STEP_LEFT 1 }
{ event AE_ZOMBIE_STEP_RIGHT 1 }
{ event AE_ZOMBIE_STEP_LEFT 1 }
{ event AE_ZOMBIE_STEP_RIGHT 1 }
{ event AE_ZOMBIE_STEP_LEFT 1 }
{ event AE_ZOMBIE_STEP_RIGHT 1 }
}
$sequence FireWalk "FireWalk" loop ACT_WALK_ON_FIRE 1 fps 30.00
$sequence FireIdle "FireIdle" loop ACT_IDLE_ON_FIRE 1 fps 30.00
$sequence attackA "attackA" ACT_MELEE_ATTACK1 2 fps 30.00 {
{ event AE_ZOMBIE_ATTACK_SCREAM 3 }
{ event AE_ZOMBIE_ATTACK_RIGHT 5 }
}
$sequence attackB "attackB" ACT_MELEE_ATTACK1 2 fps 30.00 {
{ event AE_ZOMBIE_ATTACK_SCREAM 3 }
{ event AE_ZOMBIE_ATTACK_RIGHT 5 }
}
$sequence attackC "attackC" ACT_MELEE_ATTACK1 2 fps 30.00 {
{ event AE_ZOMBIE_ATTACK_SCREAM 3 }
{ event AE_ZOMBIE_ATTACK_LEFT 5 }
}
$sequence attackD "attackD" ACT_MELEE_ATTACK1 2 fps 30.00 {
{ event AE_ZOMBIE_ATTACK_SCREAM 3 }
{ event AE_ZOMBIE_ATTACK_LEFT 5 }
}
$sequence attackE "attackE" ACT_MELEE_ATTACK1 2 fps 30.00 {
{ event AE_ZOMBIE_ATTACK_SCREAM 3 }
{ event AE_ZOMBIE_ATTACK_BOTH 5 }
}
$sequence attackF "attackF" ACT_MELEE_ATTACK1 2 fps 30.00 {
{ event AE_ZOMBIE_ATTACK_SCREAM 3 }
{ event AE_ZOMBIE_ATTACK_BOTH 5 }
}
$sequence swatleftmid "swatleftmid" ACT_ZOM_SWATLEFTMID 1 fps 30.00 {
{ event AE_ZOMBIE_STARTSWAT 3 }
{ event AE_ZOMBIE_SWATITEM 5 }
}
$sequence swatrightmid "swatrightmid" ACT_ZOM_SWATRIGHTMID 1 fps 30.00 {
{ event AE_ZOMBIE_STARTSWAT 3 }
{ event AE_ZOMBIE_SWATITEM 5 }
}
$sequence swatleftlow "swatleftlow" ACT_ZOM_SWATLEFTLOW 1 fps 30.00 {
{ event AE_ZOMBIE_STARTSWAT 3 }
{ event AE_ZOMBIE_SWATITEM 5 }
}
$sequence swatrightlow "swatrightlow" ACT_ZOM_SWATRIGHTLOW 1 fps 30.00 {
{ event AE_ZOMBIE_STARTSWAT 3 }
{ event AE_ZOMBIE_SWATITEM 5 }
}
$sequence releasecrab "releasecrab" ACT_ZOM_RELEASECRAB 1 fps 30.00
$sequence physflinch1 "physflinch1" ACT_FLINCH_PHYSICS 1 fps 30.00
$sequence physflinch2 "physflinch2" ACT_FLINCH_PHYSICS 1 fps 30.00
$sequence physflinch3 "physflinch3" ACT_FLINCH_PHYSICS 1 fps 30.00
$sequence slump_a "slump_a" loop fps 30.00
$sequence slumprise_a "slumprise_a" fps 30.00 {
{ event AE_NPC_LEFTFOOT 1 }
{ event AE_NPC_RIGHTFOOT 2 }
{ event AE_ZOMBIE_GET_UP 3 }
}
$sequence slumprise_a_attack "slumprise_a_attack" fps 30.00 {
{ event AE_NPC_LEFTFOOT 1 }
{ event AE_NPC_RIGHTFOOT 2 }
{ event AE_ZOMBIE_GET_UP 3 }
{ event AE_ZOMBIE_ATTACK_SCREAM 4 }
{ event AE_ZOMBIE_ATTACK_RIGHT 5 }
}
$sequence slumprise_a2 "slumprise_a2" fps 30.00 {
{ event AE_NPC_RIGHTFOOT 1 }
{ event AE_NPC_RIGHTFOOT 2 }
{ event AE_ZOMBIE_GET_UP 3 }
}
$sequence slump_b "slump_b" loop fps 30.00
$sequence slumprise_b "slumprise_b" fps 30.00 {
{ event AE_NPC_LEFTFOOT 1 }
{ event AE_NPC_RIGHTFOOT 2 }
{ event AE_ZOMBIE_GET_UP 3 }
}
$sequence Breakthrough "Breakthrough" fps 30.00
/*
$animation tallbot_test_delta.smd "tallbot_test_delta.smd" fps 30
$sequence flinch1inDelta "tallbot_test_idle" fps 30.00 subtract tallbot_test_delta.smd 0
$sequence flinch1inFrame "tallbot_test_idle" fps 30.00
$sequence flinch1CoreDelta "tallbot_test_idle" fps 30.00 subtract tallbot_test_delta.smd 0
$sequence flinch1OutFrame "tallbot_test_idle" fps 30.00
$sequence flinch1outDelta "tallbot_test_idle" fps 30.00 subtract tallbot_test_delta.smd 0
$sequence flinch1 "tallbot_test_idle" ACT_GESTURE_FLINCH_HEAD 1 fps 30.00 subtract tallbot_test_delta.smd 0
$sequence flinch2inDelta "tallbot_test_idle" fps 30.00 subtract tallbot_test_delta.smd 0
$sequence flinch2inFrame "tallbot_test_idle" fps 30.00
$sequence flinch2CoreDelta "tallbot_test_idle" fps 30.00 subtract tallbot_test_delta.smd 0
$sequence flinch2OutFrame "tallbot_test_idle" fps 30.00
$sequence flinch2outDelta "tallbot_test_idle" fps 30.00 subtract tallbot_test_delta.smd 0
$sequence flinch2 "tallbot_test_idle" ACT_GESTURE_FLINCH_HEAD 1 fps 30.00 subtract tallbot_test_delta.smd 0
$sequence flinch3inDelta "tallbot_test_idle" fps 30.00 subtract tallbot_test_delta.smd 0
$sequence flinch3inFrame "tallbot_test_idle" fps 30.00
$sequence flinch3CoreDelta "tallbot_test_idle" fps 30.00 subtract tallbot_test_delta.smd 0
$sequence flinch3OutFrame "tallbot_test_idle" fps 30.00
$sequence flinch3outDelta "tallbot_test_idle" fps 30.00 subtract tallbot_test_delta.smd 0
$sequence flinch3 "tallbot_test_idle" ACT_GESTURE_FLINCH_HEAD 1 fps 30.00 subtract tallbot_test_delta.smd 0
*/
$sequence Tantrum "Tantrum" loop ACT_ZOMBIE_TANTRUM 1 fps 30.00
$sequence WallPound "WallPound" loop ACT_ZOMBIE_WALLPOUND 1 fps 30.00 {
{ event AE_ZOMBIE_POUND 3 }
{ event AE_ZOMBIE_POUND 5 }
}
$sequence ragdoll "ragdoll_a" ACT_DIERAGDOLL 1 fps 30.00
$collisionjoints "physics_xsi.smd" {
$mass 150
$inertia 20.00
$damping .1
$rotdamping 3.00
$rootbone "valvebiped.bip01_pelvis"
$jointmerge "valvebiped.bip01_Pelvis" "ValveBiped.Bip01_Spine1"
$jointconstrain "valvebiped.bip01_spine2" x limit -44.00 44.00 0.20
$jointconstrain "valvebiped.bip01_spine2" y limit -39.00 39.00 0.20
$jointconstrain "valvebiped.bip01_spine2" z limit -32.00 50.00 0.20
$jointconstrain "valvebiped.bip01_r_clavicle" x limit -30.00 30.00 0.20
$jointconstrain "valvebiped.bip01_r_clavicle" y limit -46.00 46.00 0.20
$jointconstrain "valvebiped.bip01_r_clavicle" z limit -26.00 48.00 0.20
$jointconstrain "valvebiped.bip01_r_upperarm" x limit -39.00 39.00 0.20
$jointconstrain "valvebiped.bip01_r_upperarm" y limit -79.00 95.00 0.20
$jointconstrain "valvebiped.bip01_r_upperarm" z limit -93.00 28.00 0.20
$jointconstrain "valvebiped.bip01_l_clavicle" x limit -30.00 30.00 0.20
$jointconstrain "valvebiped.bip01_l_clavicle" y limit -46.00 46.00 0.20
$jointconstrain "valvebiped.bip01_l_clavicle" z limit -26.00 48.00 0.20
$jointconstrain "valvebiped.bip01_l_upperarm" x limit -30.00 30.00 0.20
$jointconstrain "valvebiped.bip01_l_upperarm" y limit -95.00 84.00 0.20
$jointconstrain "valvebiped-bip01_l_upperarm" z limit -86.00 26.00 0.20
$jointconstrain "valvebiped-bip01_l_forearm" x limit 0.00 0.00 0.20
$jointconstrain "valvebiped-bip01_l_forearm" y limit 0.00 0.00 0.20
$jointconstrain "valvebiped-bip01_l_forearm" z limit -149.00 4.00 0.20
$jointconstrain "valvebiped.bip01_l_hand" x limit -55.00 55.00 0.20
$jointconstrain "valvebiped.bip01_l_hand" y limit -55.00 55.00 0.20
$jointconstrain "valvebiped-bip01_l_hand" z limit -55.00 55.00 0.20
$jointconstrain "valvebiped.bip01_r_forearm" x limit 0.00 0.00 0.20
$jointconstrain "valvebiped.bip01_r_forearm" y limit 0.00 0.00 0.20
$jointconstrain "valvebiped.bip01_r_forearm" z limit -149.00 4.00 0.20
$jointconstrain "valvebiped.bip01_r_thigh" x limit -12.00 12.00 0.20
$jointconstrain "valvebiped.bip01_r_thigh" y limit -8.00 75.00 0.20
$jointconstrain "valvebiped.bip01_r_thigh" z limit -97.00 32.00 0.20
$jointconstrain "valvebiped.bip01_r_calf" x limit 0.00 0.00 0.20
$jointconstrain "valvebiped.bip01_r_calf" y limit 0.00 0.00 0.20
$jointconstrain "valvebiped.bip01_r_calf" z limit -12.00 126.00 0.20
$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.20
$jointconstrain "valvebiped.bip01_r_foot" z limit -15.00 35.00 0.20
$jointconstrain "valvebiped.bip01_l_thigh" x limit -12.00 12.00 0.20
$jointconstrain "valvebiped.bip01_l_thigh" y limit -73.00 6.00 0.20
$jointconstrain "valvebiped.bip01_l_thigh" z limit -93.00 30.00 0.20
$jointconstrain "valvebiped.bip01_l_calf" x limit 0.00 0.00 0.20
$jointconstrain "valvebiped.bip01_l_calf" y limit 0.00 0.00 0.20
$jointconstrain "valvebiped-bip01_l_calf" z limit -8.00 126.00 0.20
$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.20
$jointconstrain "valvebiped.bip01_l_foot" z limit -15.00 35.00 0.20
$jointconstrain "valvebiped.bip01_r_hand" x limit -55.00 55.00 0.20
$jointconstrain "valvebiped.bip01_r_hand" y limit -55.00 55.00 0.20
$jointconstrain "valvebiped.bip01_r_hand" z limit -55.00 55.00 0.20
}
//$include "hitbox.qci"
//$include "ragdoll.qci"
|
|
|
|
|
|
#2 |
![]() Join Date: May 2009
Reputation: 172
Posts: 1,143
|
instead of
Code:
$model "headcrab1" "biped_bot_a_head.smd" Code:
$bodygroup headcrab1
{
blank
studio "biped_bot_a_head.smd"
}
|
|
|
|
|
|
#3 |
![]() Join Date: Jan 2011
Reputation: 0
Posts: 29
|
Awesome thanks! Will try this over the weekend.
(Sorry for the delayed reply, I thought I had "instant notification" on, apparently not) |
|
|
|
|
|
#4 |
![]() Join Date: Jan 2011
Reputation: 0
Posts: 29
|
Thanks again, that worked!
|
|
|
|
![]() |
|
||||||
| Thread Tools | |
| Display Modes | |
|
|