IPB

Welcome Guest ( Log In | Register )

> no Gravity Gun for bot ?, lost code ?
Salvax
post Feb 23 2007, 04:35 AM
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? blink.gif

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*
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
 
Reply to this topicStart new topic
Replies
Salvax
post Feb 24 2007, 04:09 AM
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 sad.gif

and i tried to do this : i thought bot wouldl switch to SMG when he is spawned in map, but in vain... sad.gif sad.gif sad.gif

- 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 !
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Cheeseh
post Feb 24 2007, 01:34 PM
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"
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 21st August 2025 - 11:44 PM