UGX-Mods

Call of Duty 5: World at War => Help Desk => Scripting => Topic started by: ibreakteam on January 14, 2017, 05:02:38 am

Title: BO3 styled headshot sound?
Post by: ibreakteam on January 14, 2017, 05:02:38 am
How do you make it so that if the zombie dies from a headshot it plays a headshot sound?
I tried editing the zombie_death_event but it didn't work.

Heres the code I tried to add(i got the line from the hitmarkers script)
Code Snippet
Plaintext
zombie_death_event( zombie )
{
zombie waittill( "death" );
zombie thread zombie_eye_glow_stop();
if ( animscripts\utility::damageLocationIsAny( "head", "helmet", "neck" ) )
{
                // Sound here
self playsound( "bullet_impact_headshot_helmet_nodie" );
}
Title: Re: BO3 styled headshot sound?
Post by: BluntStuffy on January 14, 2017, 08:20:14 am
in _zombiemode_score look for this:

Code Snippet
Plaintext
		case "head":
case "helmet":
score = level.zombie_vars["zombie_score_bonus_head"];
break;

and add the sound there:
Code Snippet
Plaintext
		case "head":
case "helmet":
score = level.zombie_vars["zombie_score_bonus_head"];
self playsound( "bullet_impact_headshot_helmet_nodie" );
break;
         
Title: Re: BO3 styled headshot sound?
Post by: ibreakteam on January 14, 2017, 08:51:15 am
in _zombiemode_score look for this:

Code Snippet
Plaintext
		case "head":
case "helmet":
score = level.zombie_vars["zombie_score_bonus_head"];
break;

and add the sound there:
Code Snippet
Plaintext
		case "head":
case "helmet":
score = level.zombie_vars["zombie_score_bonus_head"];
self playsound( "bullet_impact_headshot_helmet_nodie" );
break;
Works like a charm, thanks a million.  :)