![]() |
![]() |
Salvax |
![]()
Post
#1
|
![]() Advanced Member ![]() ![]() ![]() Group: Members Posts: 75 Joined: 14-February 07 Member No.: 1,034 ![]() |
bot can't hold a gravity gun even the bot profile is edited : weapon = weapon_physcannon
lost weapon code in some files of the source? ![]() i am doing some thing on checkstuck part of the codes in bot.cpp, trying if bot can use gravity gun to push the objects away, but i find bot can't even hold a gravity gun...*faint* |
![]() ![]() |
Salvax |
![]()
Post
#2
|
![]() Advanced Member ![]() ![]() ![]() Group: Members Posts: 75 Joined: 14-February 07 Member No.: 1,034 ![]() |
now, bot can have gravity gun in hands, (deleted part of the codes as i said and set bot profile: weapon = default)
now there is a big problem, there is no defined key in in_buttons.h for PHYS_SWAP, and the PHYS_SWAP is a console command, so we can't use bot button thing but let bot use console command ![]() and i tried to do this : i thought bot wouldl switch to SMG when he is spawned in map, but in vain... ![]() ![]() ![]() - bot.cpp - QUOTE bool CBot :: createBotFromEdict(edict_t *pEdict, CBotProfile *pProfile) { char szModel[128]; init(); setEdict(pEdict); setup(); m_fTimeCreated = engine->Time(); ///////////////////////////// m_pProfile = pProfile; engine->SetFakeClientConVarValue(pEdict,"cl_team","default"); // engine->SetFakeClientConVarValue(pEdict,"cl_defaultweapon","pistol"); //salvax engine->SetFakeClientConVarValue(pEdict,"cl_autowepswitch","1"); engine->SetFakeClientConVarValue(pEdict,"phys_swap","1"); //salvax if ( m_pPlayerInfo && (pProfile->getTeam() != -1) ) m_pPlayerInfo->ChangeTeam(pProfile->getTeam()); NEED HELP , Captain ! |
Cheeseh |
![]()
Post
#3
|
![]() Admin ![]() ![]() ![]() ![]() ![]() Group: Admin Posts: 3,066 Joined: 11-September 03 From: uk Member No.: 1 ![]() |
you sould only hange to the gravity gun using:
--------- m_pController->SetActiveWeapon("weapon_physcannon"); ----- and change back to another weapon by using : ----- m_pController->SetActiveWeapon("weapon_pistol"); // or any other waepon name ----- I don't exactly know why you need to use "phys_swap" |
![]() ![]() |
![]() |
Lo-Fi Version | Time is now: 21st August 2025 - 11:44 PM |