.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   General Bot Coding (http://forums.bots-united.com/forumdisplay.php?f=24)
-   -   voice icon (http://forums.bots-united.com/showthread.php?t=1354)

Whistler 13-04-2004 06:41

voice icon
 
Do you want to create the bots voice icon in CS 1.6 (just like Michael Booth's 'professional' bot) ? Well, here's some info...

pfnRegUserMsg: pszName=BotVoice msg=135

(when the bot is saying something, send all its teammates netmessages like this...)
pfnMessageBegin: edict=4db0118 dest=1 type=135
pfnWriteByte: 1 (1 means display the icon)
pfnWriteByte: 3 (ENTINDEX(pBot->pEdict))
pfnMessageEnd:

(after some while...we need to remove the voice icon)
pfnMessageBegin: edict=4db0118 dest=1 type=135
pfnWriteByte: 0 (0 means remove the icon)
pfnWriteByte: 3
pfnMessageEnd:

cool huh ? But don't try to do this in CS 1.5 or other Steam MODs (eg, Steam TFC, Steam DOD) cause it just won't work ;) You can use PM's voice icon code in RACC for CS 1.5 and use this method for CS 1.6 then it will be perfect :)

You can use g_engfuncs.pfnClientCommand() to play the wav files without precaching them first. Also Michael Booth's bot uses a netmessage called "SendAudio" (the same one used in radio messages) to play wav files, but I haven't found how to use it yet and you can't use that netmessage for other MODs.

Pierre-Marie Baty 13-04-2004 06:59

Re: voice icon
 
8D l33t Whistler!!! thanks for the info!!

stefanhendriks 13-04-2004 14:17

Re: voice icon
 
cool! I will probably use this some day ! :D


All times are GMT +2. The time now is 18:22.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.