Adding Voice To Scratch SDK: Difference between revisions
Jump to navigation
Jump to search
(New page: If you start a Scratch SDK Project you will notice voice chat does not work, to fix: == Steps == 1. Add hud_voicestatus.cpp to the clientside project 2. Add this to scripts/HudLayout....) |
No edit summary |
||
| Line 6: | Line 6: | ||
1. Add hud_voicestatus.cpp to the clientside project | 1. Add hud_voicestatus.cpp to the clientside project | ||
2. Add this to scripts/HudLayout.res in your steam directory | 2. Add this to scripts/HudLayout.res in your steam directory | ||
<pre> HudVoiceSelfStatus | <pre> HudVoiceSelfStatus | ||
Revision as of 19:17, 22 January 2009
If you start a Scratch SDK Project you will notice voice chat does not work, to fix:
Steps
1. Add hud_voicestatus.cpp to the clientside project
2. Add this to scripts/HudLayout.res in your steam directory
HudVoiceSelfStatus
{
"fieldName" "HudVoiceSelfStatus"
"visible" "1"
"enabled" "1"
"xpos" "r43"
"ypos" "355"
"wide" "24"
"tall" "24"
}
HudVoiceStatus
{
"fieldName" "HudVoiceStatus"
"visible" "1"
"enabled" "1"
"xpos" "r200"
"ypos" "0"
"wide" "100"
"tall" "400"
"item_tall" "24"
"item_wide" "100"
"item_spacing" "2"
"icon_ypos" "0"
"icon_xpos" "0"
"icon_tall" "24"
"icon_wide" "24"
"text_xpos" "26"
}
3. Make a file scripts/modtextures.txt and put this inside it:
"sprites/640_hud"
{
TextureData
{
"voice_player"
{
"file" "voice/icntlk_sv"
"x" "0"
"y" "0"
"width" "32"
"height" "32"
}
"voice_self"
{
"file" "voice/icntlk_local"
"x" "0"
"y" "0"
"width" "32"
"height" "32"
}
}
}
Extra Notes
If voice transmission to other players isn't working you need to make sure that the GameRules class calls BaseClass::Think()
Thanks go to blu|two and Tony Sergi