project reality header
Go Back   Project Reality Forums > PR:BF2 Mod Forums > PR:BF2 Community Modding
21 Oct 2018, 00:00:00 (PRT)
Register Forum RulesDeveloper Blogs Project Reality Members List Search Today's Posts Mark Forums Read
PR:BF2 Community Modding Making or wanting help making your own asset? Check in here

Reply
 
Thread Tools Display Modes
Old 2018-06-22, 20:32   #1
D3litenl
Default How to create new UT-announcer using head_shot.py

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
D3litenl is offline Reply With Quote
Old 2018-06-22, 21:29   #2
[R-DEV]​AfterDune
PR:BF2 Developer
Supporting Member
PR Server License Administrator

AfterDune's Avatar
Default Re: How to create new UT-announcer using head_shot.py

You can't play sounds with Python, as it's serverside.

AfterDune is offline Reply With Quote
Old 2018-06-22, 22:00   #3
D3litenl
Default Re: How to create new UT-announcer using head_shot.py

Could there be another way to implement the UT-announcer saying "headshot" after scoring one?

Any help would be great!
D3litenl is offline Reply With Quote
Old 2018-06-22, 23:19   #4
[R-DEV]​AlonTavor
PR:BF2 Developer
Default Re: How to create new UT-announcer using head_shot.py

Add it as effect for the head material I guess? Everyone will be able to hear it though. There are no events for headshot.
AlonTavor is offline Reply With Quote
Old 2018-06-22, 23:50   #5
FFG
Project Reality Beta Tester
PR Server License Moderator

FFG's Avatar
Default Re: How to create new UT-announcer using head_shot.py

could you not assign a vbf2 medal for it and trigger a sound via that?

FFG is offline Reply With Quote
Old 2018-06-24, 22:02   #6
[R-DEV]​Arab
PR:BF2 Developer
Supporting Member

Arab's Avatar
Default Re: How to create new UT-announcer using head_shot.py

Moved to Community Modding

Arab is offline Reply With Quote
Reply


Tags
create, headshotpy, utannouncer
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 10:33.