i m just working on a vehicle for et:Qw - my 1st one for this game.
after a lot reading the tutorial with less understanding
i was able to add my vehicle to the game -
but the scripting stuff makes me crazy…
my vehicle stucks a little bit inside the ground - how to fix this?
and the physics of it are very strange -
maybe someone can help me with that?
the vehicle def:
//
// gmc
//
model vehicle_gmc
{
mesh models/vehicles/edf_gmc/gmc.md5mesh
anim base models/vehicles/edf_gmc/gmc.md5anim
anim ik_pose models/vehicles/edf_gmc/gmc.md5anim
anim initial models/vehicles/edf_gmc/gmc.md5anim
anim idle models/vehicles/edf_gmc/gmc.md5anim
}
entityDef vehicle_gmc
{
"inherit" "vehicle_base_gdf"
"option_combat_model" "1"
"option_selection_combat_model" "1"
"option_task_interface" "1"
"spawnclass" "sdVehicle_RigidBody"
"scriptObject" "vehicle_base"
"vs_vehicleScript" "gmc"
"model" "vehicle_gmc"
"input_mode" "car"
"vehicle_control" "wheeled"
"info_name" "gmc"
"health" "800"
"steering_angle" "45"
"table_gearforces" "gmc_gear_forcetable"
"table_gearspeeds" "gmc_gear_speedtable"
"overdrive_factor" "1.5"
"power_curve_scale" "2"
"collection_antivehicle" "antivehicle"
"collection_vehicles_light" "vehicles_light"
"collection_vehicles_gdf" "vehicles_gdf"
"joint_damage_smoke" "effects"
"joint_damage_fire" "effects"
"damage_smoke" "70"
"damage_level1" "50"
"damage_level2" "30"
"damage_level3" "10"
"fx_damage_level_smoke" "effects/vehicles/generic_smoke"
"fx_damage_level1" "effects/vehicles/vehicle_flames_small"
"fx_damage_level2" "effects/vehicles/vehicle_flames_medium"
"fx_damage_level3" "effects/vehicles/vehicle_flames_large"
"dmg_collide" "damage_gmc_collide"
}
damageDef damage_gmc_collide {
damage "damage_gmc_collide"
team_kill_cvar "g_allowComplaint_vehicles"
tt_obituary "tooltips/killmsgs/vehicles/gmc"
tt_obituary_unknown "tooltips/killmsgs/vehicles/gmc/empty"
tt_obituary_team_kill "tooltips/killmsgs/vehicles/gmc/teamkill"
tt_obituary_self "tooltips/killmsgs/vehicles/driving"
}
damageFilter damage_gmc_collide
{
type
{
target "target_player_all"
damage 100
}
type
{
target "target_veh_all"
damage 500
}
type
{
target "target_supply_crate"
damage 200
}
type
{
target "target_deployables_all"
damage 500
}
}
and the vscript:
table gmc_gear_speedtable
{
clamp
{
20, 40, 65, 80
}
}
table gmc_gear_forcetable
{
clamp
{
800000, 600000, 300000, 100000
}
}
template templates/vehicles/gmc/wheel_behavior
{
parameters< FrontBackParm, LeftRightParm >
text
{
"name" "FrontBackParm LeftRightParm Wheel" //10
"surface1" "FrontBackParm_LeftRightParm_wheels"
"joint" "FrontBackParm_LeftRightParm_wheel"
"slowonLeftRightParm" "1"
"health" "100"
"brakingForce" "100000"
//"drive" "1"
"alternateSuspensionModel" "1"
"suspensionUpTrace" "8"
"suspensionDownTrace" "20"
"suspensionRange" "28" //20
"suspensionVelocityScale" "150"
"suspensionBase" "5000"
"wheelSpinForceThreshhold" "1000000"
"wheelSpinForceMultiplier" "0.5"
"suspensionKCompress" "100000"
"suspensionDamping" "0"
"suspensionMaxRestVelocity" "3.5"
"maxSlip" "300"
"contactFriction" "0 0.7 0"
useTemplate templates/vehicles/gmc/wheel_FrontBackParm< "LeftRightParm" >
}
}
template templates/vehicles/gmc/wheel_front //30
{
parameters< LeftRightParm >
text
{
"turn" "1"
"radius" "28"
"footprint" "15"
}
}
template templates/vehicles/gmc/wheel_rear
{
parameters< LeftRightParm >
text
{
"hasHandbrake" "1"
"radius" "28" //40
"footprint" "30"
}
}
template templates/vehicles/gmc/wheel_middle_front
{
parameters< LeftRightParm >
text
{
"hasHandbrake" "1"
"radius" "28" //40
"footprint" "30"
}
}
vehicleDef "gmc"
{
part
{
"mins" "-96 -55 60"
"maxs" "78 55 94"
"mass" "1000"
"friction" "0.4 0.4 0.4"
}
part
{
"mins" "-96 -55 24"
"maxs" "78 55 60"
"mass" "3000"
"friction" "0.4 0.4 0.4"
}
antiroll
{
"angle_start" "5"
"angle_end" "30"
"strength" "2"
}
hurtZone
{
"mins" "-96 -55 0"
"maxs" "78 55 24"
}
positionDef
{
data
{
"joint_attach" "driver" //50
"show_player" "1"
"player_anim" "VehicleBadgerDriver"
}
view
{
eyeJoint "cam1"
autoCenter
clamp pitch
{
min -70
max 20
}
clamp yaw
{
min -80 //60
max 80
}
}
view
{
eyeJoint "cam1"
type "smooth_locked"
thirdPerson
cameraDistance 240
cameraHeight 50
}
}
exitDef
{
joint "exit_left_1"
}
exitDef
{
joint "exit_left_1"
}
wheel
{
useTemplate templates/vehicles/gmc/wheel_behavior< "front", "left" >
"drive" "1"
//"contactFriction" "0.005 0.9 0.005"
//"suspensionKCompress" "9500"
"fx_splash" "effects/water/generic_splash"
"fx_wake" "effects/water/wheel_wake"
//"control_steering" "1"
"trace_index" "0"
}
wheel
{
useTemplate templates/vehicles/gmc/wheel_behavior< "front", "right" >
"drive" "1"
//"contactFriction" "0.005 0.9 0.005"
//"suspensionKCompress" "9500"
"fx_splash" "effects/water/generic_splash"
"fx_wake" "effects/water/wheel_wake"
//"control_steering" "1"
"trace_index" "0"
}
wheel
{
useTemplate templates/vehicles/gmc/wheel_behavior< "rear", "left" >
//"drive" "1"
//"contactFriction" "0.005 0.8 0.005"
//"suspensionKCompress" "9500"
"fx_splash" "effects/water/generic_splash"
"fx_wake" "effects/water/wheel_wake"
"trace_index" "1"
}
wheel
{
useTemplate templates/vehicles/gmc/wheel_behavior< "rear", "right" >
//"drive" "1"
//"contactFriction" "0.005 0.8 0.005"
//"suspensionKCompress" "9500"
"fx_splash" "effects/water/generic_splash"
"fx_wake" "effects/water/wheel_wake"
"trace_index" "1"
}
wheel
{
useTemplate templates/vehicles/gmc/wheel_behavior< "middle_front", "left" >
//"drive" "1"
//"contactFriction" "0.005 0.8 0.005"
//"suspensionKCompress" "9500"
"fx_splash" "effects/water/generic_splash"
"fx_wake" "effects/water/wheel_wake"
"trace_index" "1"
}
wheel
{
useTemplate templates/vehicles/gmc/wheel_behavior< "middle_front", "right" >
//"drive" "1"
//"contactFriction" "0.005 0.8 0.005"
//"suspensionKCompress" "9500"
"fx_splash" "effects/water/generic_splash"
"fx_wake" "effects/water/wheel_wake"
"trace_index" "1"
}
}
its just for testing - only a driver for now - if someone can help me and i understand it ill add some more stuff
ah i forgot - the model is little bit jumping around