How to create new UT-announcer using head_shot.py
Posted: 2018-06-22 20:32
Dear anyone that can help,
After modding my current BattleField 2-mod for almost 4 years I've hit a wall. Never had I had to write new code, since I'm barely able to import new weapons, change some models around and simple text-editing. Anyhow, I've gotten permission from the author of head_shot.py to use it in my mod.
The thing is I'de like to hear the UT-Announcer saying "headshot" after the player scores a headshot. Managed to 'create' the headshot.wav in GameSounds.con but no idea of how to connect it to the message created by head_shot.py.
Hope someone could help me create the code to connect the head_shot.py message to this the selfmade-code in GameSounds.con
rem -----------------------------------------------------------------------
rem ----------------------------- HeadshotAnn------------------------------
rem -----------------------------------------------------------------------
Sound.addSound headshotannouncer
ObjectTemplate.soundFilename Common/Sound/Hud/headshot.wav
ObjectTemplate.loopCount 1
ObjectTemplate.is3dSound 0
ObjectTemplate.volume 0.5
ObjectTemplate.pan 0.5
ObjectTemplate.reverbLevel 0.1
ObjectTemplate.minDistance 1
After modding my current BattleField 2-mod for almost 4 years I've hit a wall. Never had I had to write new code, since I'm barely able to import new weapons, change some models around and simple text-editing. Anyhow, I've gotten permission from the author of head_shot.py to use it in my mod.
The thing is I'de like to hear the UT-Announcer saying "headshot" after the player scores a headshot. Managed to 'create' the headshot.wav in GameSounds.con but no idea of how to connect it to the message created by head_shot.py.
Hope someone could help me create the code to connect the head_shot.py message to this the selfmade-code in GameSounds.con
rem -----------------------------------------------------------------------
rem ----------------------------- HeadshotAnn------------------------------
rem -----------------------------------------------------------------------
Sound.addSound headshotannouncer
ObjectTemplate.soundFilename Common/Sound/Hud/headshot.wav
ObjectTemplate.loopCount 1
ObjectTemplate.is3dSound 0
ObjectTemplate.volume 0.5
ObjectTemplate.pan 0.5
ObjectTemplate.reverbLevel 0.1
ObjectTemplate.minDistance 1