Trying to get a custom sound to play from g_combat.c
Is this possible and if so what would be the proper steps in playing this sound, packaging it, and declaring it?
Need this sound for killing spree messages, which I have working.
Trying to get a custom sound to play from g_combat.c
Is this possible and if so what would be the proper steps in playing this sound, packaging it, and declaring it?
Need this sound for killing spree messages, which I have working.
In MS VC++ it’s possible to search the whole project for keywords.
It’s search files in the Edit menu (translated from german menu names).
You could search for an existing sound.
As result you will get some new keywords to search for.
For example I’ve searched now a mod of mine for “airstrike_expl_1.wav”.
As result I get:
C:\PROGRAMME\WOLFENSTEIN - ENEMY TERRITORY\MODDING\BLOODSIGHT\src\cgame\cg_main.c(1133): cgs.media.sfx_airstrikeExp[0] = trap_S_RegisterSound( "sound/weapons/airstrike/airstrike_expl_1.wav", qfalse );
Note:
it’s only roughly line 1133 (as I’ve said before the source in my file might have been changed)
Then you could do a search for “cgs.media.sfx_airstrike”.
And so on.
To play a sound from qagame all you need to do is this:
G_Sound( ent, G_SoundIndex( "whatever.wav" ) );