[Mini-Tut] Headshot sound

Results 1 to 2 of 2
  1. #1
    TruCore ES3N1N is offline
    MemberRank
    Nov 2018 Join Date
    UkraineLocation
    217Posts

    note [Mini-Tut] Headshot sound

    I share with you a little code. When a shot hits the enemy, the sound is played.

    Search this in WarZ.sln:
    PHP Code:
    void obj_Player::ApplyDamage(const r3dPoint3DdmgPosfloat damageGameObjectfromObjint bodyBoneint dmgType){ 
    LOOK this:
    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());            }*/ 
    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());            } 


  2. #2
    Valued Member francovegini is offline
    MemberRank
    Apr 2014 Join Date
    BrazilLocation
    135Posts

    Re: [Mini-Tut] Headshot sound

    Good job.



Advertisement