Adding Proximity Voice: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(sdk 2013 new lines)
m (Added categories to the page, removed some first person perspectives)
Line 3: Line 3:
}}
}}


Hello today I am going to be showing you how to create proximity chat for HL2MP mod or equivalent.
This tutorial is going to show how to create a proximity chat for a HL2MP mod or equivalent.


This was implemented in the Source Mod Faceless [http://www.moddb.com/mods/faceless by Ethereal Entertainment].  
This was implemented in the Source Mod Faceless by [http://www.moddb.com/mods/faceless Ethereal Entertainment].  


First thing you are going to need to do is open game/shared/voice_gamemgr.cpp


Open game/shared/voice_gamemgr.cpp


Then go to around line 228...
Then go to around line 228...
Line 22: Line 22:
</syntaxhighlight>
</syntaxhighlight>


Next you need to change the distance at which it will project the voice.
Next you need to change the distance at which it will project the voice. Locate line 106 and change...
Locate line 106 and change ...


<syntaxhighlight lang="cpp">
<syntaxhighlight lang="cpp">
Line 29: Line 28:
</syntaxhighlight>
</syntaxhighlight>


To something like this...
To this...


<syntaxhighlight lang="cpp">
<syntaxhighlight lang="cpp">
Line 35: Line 34:
</syntaxhighlight>
</syntaxhighlight>


source:
Source:
http://t-plusplus.com/creating-proximity-chat-in-the-source-engine-sdk/
http://t-plusplus.com/creating-proximity-chat-in-the-source-engine-sdk/
[[Category:Programming]][[Category:Tutorials]]

Revision as of 13:21, 6 January 2019

Template:Otherlang2

This tutorial is going to show how to create a proximity chat for a HL2MP mod or equivalent.

This was implemented in the Source Mod Faceless by Ethereal Entertainment.


Open game/shared/voice_gamemgr.cpp

Then go to around line 228...

bool bProximity = false;

Change that to...

bool bProximity = true;

Next you need to change the distance at which it will project the voice. Locate line 106 and change...

m_iProximityDistance = -1;

To this...

m_iProximityDistance = 10;

Source: http://t-plusplus.com/creating-proximity-chat-in-the-source-engine-sdk/