AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Triggering UpdateSpeakerStatus (https://forums.alliedmods.net/showthread.php?t=344953)

djuk1c 12-22-2023 15:04

Triggering UpdateSpeakerStatus
 
Hey

I am looking for a way to trigger the CVoiceStatus::UpdateSpeakerStatus function with a specific entity id.
I need a way to set the m_VoicePlayers[entityId] to true;
https://github.com/ValveSoftware/hal...tatus.cpp#L392

As far as i have tested, the BotVoice message does not trigger this, it just draws the fake sprite above the players head

WATCH_D0GS UNITED 12-22-2023 15:45

Re: Triggering UpdateSpeakerStatus
 
This may help you:
https://wiki.alliedmods.net/Half-lif...ents#SendAudio

It will give you the id of the bot who sent the audio, the pitch, and the string.

Is this what you want?

djuk1c 12-23-2023 04:53

Re: Triggering UpdateSpeakerStatus
 
I will test this soon and let you know, thank you
Are you sure this sets the m_VoicePlayers[entityId]?

WATCH_D0GS UNITED 12-23-2023 10:00

Re: Triggering UpdateSpeakerStatus
 
1 Attachment(s)
You can use this debugger We've created to get data from the game events in real-time.

If you set get_data_mode to 6 in the console (now the default), the plugin will show you enough data for what you want, like below:

PHP Code:

cl_str_data[3]: 94                                    // Pitch
cl_str_data[2]: radio\bot\im_coming.wav  // Audio File
cl_str_data[1]: 13                                  //  Player who sent the audio 

Please open the script and read. There's a description explaining how to use it.
Add it to your test server and add bots for testing.

Use radio message keys like Z, X, and C to make the bots talk more.

It's better for you to be the first player to join because the default client the plugin use is 1. You can specify.

We will optimize this debugger soon.
You can use it to inspect any event.

Download:

djuk1c 12-23-2023 13:24

Re: Triggering UpdateSpeakerStatus
 
SendAudio doesnt seem to do what i want, it doesnt trigger the voice system in game
Can check with voice_clientdebug 1

djuk1c 12-23-2023 14:08

Re: Triggering UpdateSpeakerStatus
 
The BotVoice message almost works as i want it to work

The CVoiceStatus::UpdateSpeakerStatus gets triggered with BotVoice, but it gets turned off when the round ends, i need it to stay on, like the real voice stays on when the round ends but people still keep talking


All times are GMT -4. The time now is 00:32.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.