HL2 Buggy replacement - need help

R

RR_Raptor65

Guest
Hey, I'm hoping someone can help me with this damn Jeep.

I've taken the MB Jeep from Day of Defeat Source, and rigged it up to replace the HL2 Buggy. The thing drives perfectly, steers like it should, except it flips over VERY easily. I've been trying my hardest to get 'massCenterOverride' to help with this, but it has been giving no effect, even when I changed all three values to 50 just to see if there was any difference at all, ontop of that, the Max Speed values also have no effect, as I've set these to 1 with no effect.

Here's what I've got on the QC:
Code:
$cd "C:\Documents and Settings\***\My Documents\HL-2 Models\Vehicles\Jeep"
$modelname "buggy.mdl"
$model "body" "jeep_ref.smd"
$cdmaterials "models\jeep\"

//These pose parameters tell half-life how far the wheel can spin. 
$poseparameter vehicle_wheel_fr_spin -180 180 loop 360 
$poseparameter vehicle_wheel_fl_spin -180 180 loop 360 
$poseparameter vehicle_wheel_rl_spin -180 180 loop 360 
$poseparameter vehicle_wheel_rr_spin -180 180 loop 360 

// This pose parameter tells controls the needle on the spedometer. 
$poseparameter vehicle_guage 0 1 

// This pose parameter tells half-life how to steer. 
$poseparameter vehicle_steer -1 1 

// These pose parameters tell half-life handle the wheel suspension. 
$poseparameter vehicle_wheel_fl_height 0 1 
$poseparameter vehicle_wheel_fr_height 0 1 
$poseparameter vehicle_wheel_rl_height 0 1 
$poseparameter vehicle_wheel_rr_height 0 1 

$keyvalues  
{ 
	"vehicle_entry"
	{ 
		// Entries are: Key = enter animation, Value = Hitbox group
		"enter_left"	"1"
		"enter_right"	"2"
		"enter_rear"	"3"  
	} 

	"vehicle_exit"
	{
		// Entries are: Key = exit animation, Value = "upright" or "upsidedown"
		"exit_left"	"upright"
		"exit_right"	"upright"
		"exit_rear"	"upright"
		"exit_front"	"upright"
		"exit_bottom"	"upsidedown"
	} 

	// This list contains exits which you don't want to exit from unless everything else is blocked
	"vehicle_escape_exit"
	{
		"exit_left"	"upright"
		"exit_right"	"upright"
		"exit_rear"	"upright"
		"exit_front"	"upright"
		"exit_bottom"	"upsidedown"
	}
}

$keyvalues
{
	"vehicle"
	{
		"body"
		{
			"countertorquefactor"	"1"
			"massCenterOverride"	"0 0 0"
			"massoverride"		"1112"		// kg
			"addgravity"		"0.33"
		}

		"engine"
		{
			"horsepower"		"40"
			"maxspeed"		"1"		// mph
			"maxReverseSpeed"	"1"		// mph
		}
	}
}

// These specify the various animations which are referred to below 
$animation idle_anim "jeep_idle" 

$animation spin_anim000 "jeep_idle"   subtract idle_anim 0 

// These are all the animations for the tire rotation 
$animation spin_anim_fr120 "jeep_spin_fr120" subtract idle_anim 0 
$animation spin_anim_fr240 "jeep_spin_fr240" subtract idle_anim 0 
$animation spin_anim_fl120 "jeep_spin_fl120" subtract idle_anim 0 
$animation spin_anim_fl240 "jeep_spin_fl240" subtract idle_anim 0 
$animation spin_anim_rr120 "jeep_spin_rr120" subtract idle_anim 0 
$animation spin_anim_rr240 "jeep_spin_rr240" subtract idle_anim 0 
$animation spin_anim_rl120 "jeep_spin_rl120" subtract idle_anim 0 
$animation spin_anim_rl240 "jeep_spin_rl240" subtract idle_anim 0 

// These are the two animations for the steering 
$animation steer_anim0 "jeep_steer0" subtract idle_anim 0 
$animation steer_anim1 "jeep_steer1" subtract idle_anim 0 

// These are the animations for the wheel suspension 
$animation jump_anim_fr0 "jeep_jump_fr0" subtract idle_anim 0 
$animation jump_anim_fl0 "jeep_jump_fl0" subtract idle_anim 0 
$animation jump_anim_rr0 "jeep_jump_rr0" subtract idle_anim 0 
$animation jump_anim_rl0 "jeep_jump_rl0" subtract idle_anim 0 

// This is the main sequence upon which everything else is based 
$sequence idle idle_anim fps 30 ACT_IDLE 2 

// This is the blended sequence which describes how to rotate the front right wheel 
$sequence wheel_fr_spin spin_anim000 fps 30  { 
  blend vehicle_wheel_fr_spin -180 180 
  blendwidth 4 
  delta 
  autoplay 
   spin_anim_fr240 spin_anim_fr120 spin_anim000 
} 

// This is the blended sequence which describes how to rotate the front left wheel 
$sequence wheel_fl_spin spin_anim000 fps 30 { 
  blend vehicle_wheel_fl_spin -180 180 
  blendwidth 4 
  delta 
  autoplay 
  spin_anim_fl240 spin_anim_fl120 spin_anim000 
} 
 // This is the blended sequence which describes how to rotate the rear right wheel 
$sequence wheel_rr_spin spin_anim000 fps 30  { 
  blend vehicle_wheel_rr_spin -180 180 
  blendwidth 4 
  delta 
  autoplay 
  spin_anim_rr240 spin_anim_rr120 spin_anim000 
} 

// This is the blended sequence which describes how to rotate the rear left wheel 
$sequence wheel_rl_spin spin_anim000 fps 30  { 
  blend vehicle_wheel_rl_spin -180 180 
  blendwidth 4 
  delta 
  autoplay 
  spin_anim_rl240 spin_anim_rl120 spin_anim000 
} 

// This is the blended sequence which describes how to steer the front wheels 
$sequence steer steer_anim0 fps 30  { 
  blend vehicle_steer -1 1 
  blendwidth 2 
  delta 
  autoplay 
  steer_anim1 
} 
 // This is the blended sequence which describes how to bounce the right front wheel 
$sequence wheel_fr_suspension jump_anim_fr0 fps 30  { 
  blend vehicle_wheel_fr_height 0 1 
  blendwidth 2 
  delta 
  autoplay 
  spin_anim000 
} 
 // This is the blended sequence which describes how to bounce the left front wheel 
$sequence wheel_fl_suspension jump_anim_fl0 fps 30  { 
  blend vehicle_wheel_fl_height 0 1 
  blendwidth 2 
  delta 
  autoplay 
  spin_anim000 
} 

// This is the blended sequence which describes how to bounce the right rear wheel 
$sequence wheel_rr_suspension jump_anim_rr0 fps 30  { 
  blend vehicle_wheel_rr_height 0 1 
  blendwidth 2 
  delta 
  autoplay 
  spin_anim000 
} 

// This is the blended sequence which describes how to bounce the left rear wheel 
$sequence wheel_rl_suspension jump_anim_rl0 fps 30  { 
  blend vehicle_wheel_rl_height 0 1 
  blendwidth 2 
  delta 
  autoplay 
  spin_anim000 
}

// This is the exit animation. Depending on where you are looking it can run difference animations on exiting the vehicle. 
// You need one of these or half-life will crash when you leave the jeep 
$sequence enter_left "enter_left" fps 20 
$sequence enter_rear "enter_rear" fps 20 
$sequence enter_right "enter_right" fps 20 
$sequence exit_bottom "exit_bottom" fps 20 
$sequence exit_front "exit_front" fps 20 
$sequence exit_left "exit_left" fps 20 
$sequence exit_rear "exit_rear" fps 20 
$sequence exit_right "exit_right" fps 20 

// This specifies the players viewpoint when you get in the jeep. 
// The rotation MUST be correct or your view will rotate when you get in the jeep. 
$attachment "vehicle_driver_eyes" "jeep.view" 0.00 0.00 0.00 rotate 0 0 -90 

// This specifes where you end up in relation to the jeep  when you get out.  
$attachment "vehicle_driver_exit" "jeep.body" -20.00 60.00 -60.00 rotate 0 0 -90 

// Wheel locations. This tells half-life the location of each of your wheels. 
// Make sure these are correct or you can get very weird results. 
// Also make sure the distance between the wheels in the X and Z dimension are greater than zero. 
$attachment "wheel_fl" "jeep.wheel_fl" 0.00 0 0.00 rotate 0 0 0 
$attachment "wheel_fr" "jeep.wheel_fr" 0.00 0 0.00 rotate 0 0 0 
$attachment "wheel_rr" "jeep.wheel_rr" 0.00 0 0.00 rotate 0 0 0 
$attachment "wheel_rl" "jeep.wheel_rl" 0.00 0 0.00 rotate 0 0 0 

// Not sure if these are used. 
$attachment "raytrace_fl" "jeep.body" 7.00 100 15.00  rotate 0 0 0 
$attachment "raytrace_fr" "jeep.body" 7.00 100 -15.00  rotate 0 0 0 
$attachment "raytrace_rr" "jeep.body" -7.00 100 15.00  rotate 0 0 0 
$attachment "raytrace_rl" "jeep.body" -7.00 100 -15.00  rotate 0 0 0 

// These attachments define what animation is run when you exit the jeep. You need at least one 
// or half-life will crash when you leave the jeep. 
$attachment "exit_bottom" "jeep.body" 69.43 19.95 28.02 rotate -90 -90 0 
$attachment "exit_front" "jeep.body" 69.43 19.95 28.02 rotate -90 -90 0 
$attachment "exit_left" "jeep.body" 69.43 19.95 28.02 rotate -90 -90 0 
$attachment "exit_rear" "jeep.body" 69.43 19.95 28.02 rotate -90 -90 0 
$attachment "exit_right" "jeep.body" 69.43 19.95 28.02 rotate -90 -90 0 
$attachment "enter_left" "jeep.body" 69.43 19.95 28.02 rotate -90 -90 0 
$attachment "enter_rear" "jeep.body" 69.43 19.95 28.02 rotate -90 -90 0 
$attachment "enter_right" "jeep.body" 69.43 19.95 28.02 rotate -90 -90 0 

$surfaceprop "metal" 

// This is used to specify the entry and exit points created above to half-life. 
// If you don't have this then the entry and exit information above 
//   is ignored. You MUST have the vehicle_exit line. The vehicle_entry line is optional. 
$keyvalues { 
    vehicle_exit { 
    "exit1" "upright" } 
} 

$collisionmodel "jeep_phy.smd" { 
   $concave 
   $mass 1112.0 
   $inertia 1.00 
   $damping 0.00 
   $rotdamping 0.00 
}

Any help would be greatly appreciated, I'm stumped.

Also, while its more of a visual detail rather than a gameplay detail, the enter/exit animations don't seem to want to work either, I haven't really looked into the cause of this on my own (Been too busy trying to cure my beloved Jeep of its instability problem), I have a feeling its an issue with the attachments, but if I'm wrong, lemme know.

Thanks in advance!
 
Back
Top