![]() |
Bot Won't Join Team
I am trying to make a DOD bot. I am using the hpb_bot_mm. Everything compiles fine and the bot will join the game when I use AddBot. I have implemented an if clause in GiveFnptrsToDll to set the mod_id and the game_dll. I have added the correct VGUIMenu message handling code to pfnMessageBegin and added the function BotClient_DOD_VGUI. As well I've added the team and class choosing code to BotStartGame. Finally, I've laced all these functions with LOG_CONSOLE to see where the error happens.
The bot never executes BotClient_DOD_VGUI. And the log doesn't show the bot receiving any network messages. I am assuming that Code:
index = UTIL_GetBotIndex(ed); I'm not sure what the problem is. I think I may have missed a step in initializing the bot. Can anybody suggest a place I might have missed? Thanks alot, Kelden. Update: I tried my bot in cstrike since I didn't touch any of the mod specific code. The same problem was happening there, the bot connects but stays there. I tried rebuilding from the original source (hpb_bot_mm from the filebase) and the same error occoured. I am using VC++ Express 2005. I had to resave all the files in /metamod/ in a Win32 file format, I turned off warnings and interpret warnings as errors. I'm going to try again with warnings enabled to see if anything pops up. |
Re: Bot Won't Join Team
The problem is that the bot can't handle VGUI messages correct, because of that in CS we switched to classic menus and we are looking for the "ShowMenu" msg, dunno if DOD have classic menus and how you can switch your bot to them. HPB bot for CS doesn't work because its not updated.
Anyway here how we switch in CS to classic menus for the bots in the create function we put this: Code:
ENTITY_SET_KEYVALUE(pEdict, "_vgui_menus", "0"); |
Re: Bot Won't Join Team
Edit: Thanks, I'll try that!
|
Re: Bot Won't Join Team
Just add it in to the bot creation function after the bot is created. It seems that HPB bot use the SET_CLIENT_KEYVALUE() function, so find this lines of code
Code:
if (mod_id == CSTRIKE_DLL) Code:
SET_CLIENT_KEYVALUE( clientIndex, infobuffer, "_vgui_menus", "0"); |
Re: Bot Won't Join Team
I did, and I think I'm on the right track now. But its still not working. I think the MOTD is getting in the way from what I've seen on other forums. I'm going to put an IN_ATTACK command in...
EDIT: DOD uses the jointeam (0|1|3|5) and cls_(classname) commands to change team/class, could I just bypass the VGUI someway and use these commands afterwords? Maybe just fire three times? EDIT again: lol, forgot. I didn't even get a VGUI event in the first place... I can just use the commands in BotStartGame. |
Re: Bot Won't Join Team
You are not getting VGUI because of switching to classic menus, track the "ShowMenu" message, but anyway if just the jointeam command do the trick I think it's enough. :)
|
Re: Bot Won't Join Team
IT IS! hurray! Thank you very much for your help. I got it to work.
P.S. Would there be a place on the forum or wiki or something for me to post some DOD specific stuff? Such as the class change commands, msg_ids etc? Do you think that would be useful, or would it be unnecessary? |
Re: Bot Won't Join Team
There is wiki, look up on the links of the page, there is password to keep the spam bots away but when you open the page the password will be displayed on the prompt. Go in and post everything you want. :)
|
All times are GMT +2. The time now is 04:18. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.