MG 42 sounds


(MADDOG) #1

I have been playing around in the .weap file for this gun for so long and frankly everything i tried is not working the way i want it to work!

I want the gun to play the Fire_loop of the mg 42 when i hit the fire buton and then play the cooldown sound for when i stop firing! But what happens is that the sound plays even when the gun is in overheat! Is there something wrong in this .weap file that is causing it to play when the gun is in overheat?

weaponDef
{
// This basically fills out weaponInfo_t
client {
//standModel “” // weapon pickup ‘stand’ (do we still use this?)
droppedAnglesHack
pickupModel “models/multiplayer/mg42/mg42_pickup.md3”
//pickupSound “sound/misc/w_pkup.wav”

	weaponConfig		"models/multiplayer/mg42/weapon.cfg"
	handsModel			"models/multiplayer/mg42/v_mg42_hand.md3"
	
	flashDlightColor	1.0 0.6 0.23
	//flashSound			"sound/weapons/mg42/mg42_fire.wav"		// supports up to 4 flash sounds
	flashEchoSound		"sound/weapons/mg42/mg42_far.wav"		// supports up to 4 flash echo sounds
	//lastShotSound		""										// supports up to 4 last shot sounds
	
	//readySound		""
	firingSound			"sound/weapons/mg42/mg42_fire_loop.wav"									// no weapons seem to use this, basically it's a replacement hum for readysound, but then when firing
	overheatSound		"sound/weapons/mg42/mg42_heat.wav"
	reloadSound			"sound/weapons/mg42/mg42_reload.wav"
	reloadFastSound		"sound/weapons/mp40/mp40_reload_fast.wav"		// some weapons have fast reloads due to the skill system
	//spinupSound		""									// sound started when fire button goes down, and stepped on when the first fire event happens
	spindownSound		"sound/weapons/mg42/mg42_cooldown.wav"								// sound called if the above is running but player doesn't follow through and fire
	//switchSound		""									// allow overriding of weaponswitch sound
	
	//weaponIcon			"icons/iconw_mg42_1"
	weaponSelectedIcon	"icons/iconw_mg42_1_select"
	
	//missileModel		""
	//missileSound		""
	//missileTrailFunc	""									// supports "GrenadeTrail", "RocketTrail", "PyroSmokeTrail" and "DynamiteTrail" (we REALLY want a particle system for this)
	//missileDlight		0
	//missileDlightColor	0 0 0							// do we still use this?
	
	ejectBrassFunc		"MachineGunEjectBrass"				// supports "MachineGunEjectBrass" and "PanzerFaustEjectBrass"
	
	modModel 0			"models/multiplayer/mg42/mg42_3rd_bipod.md3"
	
	firstPerson {
		model			"models/multiplayer/mg42/v_mg42.md3"
		flashModel		"models/multiplayer/mg42/v_mg42_flash.mdc"

		// weapon building
		// the parts are numbered because there are some hardcoded references for some weapons to certain parts
		weaponLink
		{
			part 0
			{
				tag		"tag_barrel"
				model	"models/multiplayer/mg42/v_mg42_barrel.md3"
				axisskin	"models/multiplayer/mg42/mg42_axis.skin"
				alliedskin	"models/multiplayer/mg42/mg42_allied.skin"
			}
			part 1
			{
				tag		"tag_barrel2"
				model	"models/multiplayer/mg42/v_mg42_barrel2.md3"
			}
			part 2
			{
				tag		"tag_barrel3"
				model	"models/multiplayer/mg42/v_mg42_barrel3.md3"
			}
			part 3
			{
				tag		"tag_barrel4"
				model	"models/multiplayer/mg42/v_mg42_barrel4.md3"
			}
			part 4
			{
				tag		"tag_barrel5"
				model	"models/multiplayer/mg42/v_mg42_barrel5.md3"
			}
			part 5
			{
				tag		"tag_barrel6"
				model	"models/multiplayer/mg42/v_mg42_barrel6.md3"
				axisskin	"models/multiplayer/mg42/mg42_axis.skin"
				alliedskin	"models/multiplayer/mg42/mg42_allied.skin"
			}
		}
	}
	
	thirdPerson {
		model			"models/multiplayer/mg42/mg42_3rd.md3"
		flashmodel		"models/multiplayer/mg42/mg42_3rd_flash.mdc"
	}
}

}


(Jaquboss) #2

you could look how it is done in FalckonET both sources and mod itselfs are downloadable


(MADDOG) #3

I did i copied the .weap file from FalckoneET mod and tried it! It sort of worked, the cooldown did not work and when the gun overheated and you where pressing fire it still played the loop!


(Jaquboss) #4

that is reason why I said that sources are avaiable…
This is simply not possible in stock ET/ETPub/ETPro and so on… You have to change sourcecode , nut much but you have…
it would be probably good to make a hook to keep mod compatibility, but then it can look like a cheat and just because of this :nag:?


(MADDOG) #5

I can’t code well and frankly don’t have a program to open the source code! If i could get a program then i would probable get back into coding and figure the stuff out! Are there any free programs to open and edit the sorcecode?


(MADDOG) #6

Also is there a way to add another airplane sound for the airstrike without going into coding? I have one for allies and one for axis.


(kamikazee) #7

Crimson Editor?
Notepad? (Oh yes, it comes with Windows so it ain’t completely free…)
Vim? (Windows version, but vim is kinda complicated to get used to)