Moderator elections are being held. See Valve Developer Community:Moderator elections for more details.
Users who would like to run for moderator must be autoconfirmed and have at least 100 edits. Users can check their own edit count at Special:Preferences.

weapon_pumpshotgun

From Valve Developer Community
Jump to: navigation, search

Stub

This article or section is a stub. You can help by adding to it.

Info.png
This entity is not in the FGD by default .
It should not be put directly in a map.
class hierarchy
CPumpShotgun
CBaseShotgun
CTerrorGun
CTerrorWeapon
CWeaponCSBase
CBaseCombatWeapon
CBaseAnimating
CBaseEntity

weapon_pumpshotgun is a point entity available in Left 4 Dead series Left 4 Dead series. Held pump shotgun. For placing pump shotgun spawns in a map use weapon_pumpshotgun_spawn or weapon_spawn.

Keyvalues

Reserve ammo (Ammo) <integer>
Reserve ammo of the weapon.
Note.pngNote:This value will be multiplied by cvar terror_ammo_multiplier(default 2) and won't exceed the value of cvar ammo_shotgun_max.
Skin (skin) <integer>
Selects a skin from the model's index, starting with 0.

Weapon Scipt

🖿scripts/weapon_pumpshotgun.txt
WeaponData
{
	// Terror-specific Data --------------------
	"VerticalPunch"			"4"
	"SpreadPerShot"			"1"
	"MaxSpread"			"5"
	"SpreadDecay"			"5"
	"MinDuckingSpread"		"0"
	"MinStandingSpread"		"0.8"
	"MinInAirSpread"		"2.5"  //increased accuracy
	"MaxMovementSpread"		"1.5"  //increased accuracy
	"PelletScatterPitch"		"5.0"  //increased accuracy
	"PelletScatterYaw"		"7.5"
	"ReloadDuration"		"0.473"
	"AddonAttachment"		"primary"
	"Team"					"Survivor"
	
	"Tier"					"1"		// valid entries are 0, 1, 2
	
	"ResponseRulesName"		"PumpShotgun"

	// particle muzzle flash effect to play when fired
	"MuzzleFlashEffect_1stPerson"		"weapon_muzzle_flash_shotgun_FP"
	"MuzzleFlashEffect_3rdPerson"		"weapon_muzzle_flash_autoshotgun"

	// model for the shell casing to eject when we fire bullets
	"EjectBrassEffect"		"weapon_shell_casing_shotgun"
	
	// Used in the music system when this weapon fires
	"MusicDynamicSpeed"		"2.5"
	
	"DisplayName"			"#L4D_Weapon_PumpShotgun"
	"DisplayNameAllCaps"		"#L4D_Weapon_PumpShotgun_CAPS"

	// 360 Terror Data
	"MaxAutoAimDeflection1"			"10.0"
	"MaxAutoAimRange1"				"0"
	//This value determins how "big" a target is for auto aim. If a target is 10.0 units big then it is considered 10.0*scale.  
	//You can think about this value controlling a falloff value on distant targets, the smaller the value the harder it is to hit at a distance.
	"WeaponAutoAimScale"			"1.0"
	// End Terror-specific Data ----------------

	"Rumble"			"5"

	"MaxPlayerSpeed" 		"220"
	"WeaponType"			"shotgun"
	"WeaponPrice"			"1700"
	"WeaponArmorRatio"		"1.0"
	"CrosshairMinDistance"		"8"
	"CrosshairDeltaDistance"	"6"
	"BuiltRightHanded"		"1"
	"PlayerAnimationExtension" 	"m3s90"
	"MuzzleFlashScale"		"1.3"
	
	"CanEquipWithShield"	"0"
	
	// Weapon characteristics:
	"PenetrationNumLayers"		"2"
	"PenetrationPower"			"30"
	"PenetrationMaxDistance"	"500"
	"CharacterPenetrationMaxDistance" "300" // Shooting through infected is doesn't count against penetration count out to this range

	"Damage"			"25"	// 22
	"Range"				"3000"
	"RangeModifier"		"0.7"	// 0.96
	"Bullets"			"10"
	"CycleTime"			"0.5"
	
	// Weapon data is loaded by both the Game and Client DLLs.
	"printname"			"Pump Shotgun"	
	"playermodel"		"models/w_models/weapons/w_shotgun.mdl"
	
	"viewmodel"			"models/v_models/v_pumpshotgun.mdl"

	"CharacterViewmodelAddon"
	{
		"Coach"				"models/weapons/arms/v_arms_coach_new.mdl"
		"Mechanic"			"models/weapons/arms/v_arms_mechanic_new.mdl"
		"Producer"			"models/weapons/arms/v_arms_producer_new.mdl"
		"Gambler"			"models/weapons/arms/v_arms_gambler_new.mdl"
		
		"Manager"			"models/weapons/arms/v_arms_louis.mdl"
		"Biker"				"models/weapons/arms/v_arms_francis.mdl"
	 	"TeenGirl"			"models/weapons/arms/v_arms_zoey.mdl"
		"NamVet"			"models/weapons/arms/v_arms_bill.mdl"
	}

	"anim_prefix"			"anim"
	"bucket"			"0"
	"bucket_position"		"0"

	"clip_size"			"8"
	
	"primary_ammo"			"AMMO_TYPE_SHOTGUN"
	"secondary_ammo"		"None"

	"weight"			"20"
	"item_flags"			"0"

	// Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds)
	SoundData
	{
		"single_shot"		"Shotgun.Fire"
		//"reload"		"Shotgun.WorldReloadShell"
		//"reload_pump"		"Shotgun.WorldReloadPump"
		"shoot_incendiary"	"Shotgun.FireIncendiary"
	}

	// Weapon Sprite data is loaded by the Client DLL.
	TextureData
	{
		"weapon"
		{
				"file"		"vgui/hud/icon_pumpshotgun"
				"x"		"0"
				"width"		"256"
				"height"	"64"	
		}
		"ammo"
		{
				"file"		"vgui/hud/iconsheet2"
				"x"			"0"
				"y"			"128"
				"width"		"64"
				"height"	"64"
		}
		"crosshair"
		{
				"file"		"sprites/crosshairs"
				"x"			"0"
				"y"			"48"
				"width"		"24"
				"height"	"24"
		}
		"autoaim"
		{
				"file"		"sprites/crosshairs"
				"x"			"0"
				"y"			"48"
				"width"		"24"
				"height"	"24"
		}
	}
	ModelBounds
	{
		Viewmodel
		{
			Mins	"-13 -3 -13"
			Maxs	"26 10 -3"
		}
		World
		{
			Mins	"-9 -8 -5"
			Maxs	"28 9 9"
		}
	}
}

See Also