I share with you a little code. When a shot hits the enemy, the sound is played.
Search this in WarZ.sln:
LOOK this:PHP Code:void obj_Player::ApplyDamage(const r3dPoint3D& dmgPos, float damage, GameObject* fromObj, int bodyBone, int dmgType){
Replace:PHP Code:*/if (fromObj == gClientLogic().localPlayer_) { if(bodyBone == uberAnim_->GetBoneID("Bip01_Head")) SoundSys.PlayAndForget(SoundSys.GetEventIDByPath("Sounds/BulletHits/Hit_Headshot"), GetPosition()); else if(dmgType==storecat_MELEE) SoundSys.PlayAndForget(SoundSys.GetEventIDByPath("Sounds/WarZ/Impacts/Impacts-KnifeStab"), GetPosition()); else SoundSys.PlayAndForget(SoundSys.GetEventIDByPath("Sounds/WarZ/Impacts/Impacts-Body"), GetPosition()); }*/
PHP Code:if (fromObj == gClientLogic().localPlayer_) { if(bodyBone == uberAnim_->GetBoneID("Bip01_Head")) SoundSys.PlayAndForget(SoundSys.GetEventIDByPath("Sounds/BulletHits/Hit_Headshot"), GetPosition()); else if(dmgType==storecat_MELEE) SoundSys.PlayAndForget(SoundSys.GetEventIDByPath("Sounds/WarZ/Impacts/Impacts-KnifeStab"), GetPosition()); else SoundSys.PlayAndForget(SoundSys.GetEventIDByPath("Sounds/WarZ/Impacts/Impacts-Body"), GetPosition()); }



Reply With Quote![[Mini-Tut] Headshot sound](http://ragezone.com/hyper728.png)

