.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Developer's Farm > General Bot Coding
General Bot Coding See what a pain it is to get those little mechs shooting around

Reply
 
Thread Tools
Problem again ...
Old
  (#1)
slash-evil
Guest
 
Status:
Posts: n/a
Default Problem again ... - 19-02-2004

Why some of the bots don't attack with knife ([P*D]) ? I try to changed some part of the code to fix it but it won't work ... Any advice ?
  
Reply With Quote
Re: Problem again ...
Old
  (#2)
slash-evil
Guest
 
Status:
Posts: n/a
Default Re: Problem again ... - 19-02-2004

And one question this is

pEdict->v.button | = IN_ATTACK;
pEdict->v.button | = IN_DUCK;

mean the bot will attack and then duck ?
  
Reply With Quote
Re: Problem again ...
Old
  (#3)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: Problem again ... - 19-02-2004

About your 2nd post: yes, but make sure that the bot presses IN_DUCK for enough time long (not just one frame, else it won't be noticeable).

About your 1st post, perhaps you could show us what parts of the code you tried to change and we may be able to tell you whether there's something wrong with them or not...



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: Problem again ...
Old
  (#4)
KaCaT
Moderator
 
Status: Offline
Posts: 55
Join Date: Dec 2003
Default Re: Problem again ... - 19-02-2004

in bot.cpp, around line 7118
change this code:
Code:
if(pBot->bot_personality==1)
   SelectWeaponByName(pBot, "weapon_knife");
to this
Code:
if(pBot->bot_personality==1)
  {
   if (pBot->current_weapon.iId != CS_WEAPON_KNIFE)
	if (pBot->current_weapon.iId != CS_WEAPON_INSWITCH)
	 SelectWeaponByName(pBot, "weapon_knife");
  }
will fix the problem.


IvPBot - Improved version of Podbot
  
Reply With Quote
Re: Problem again ...
Old
  (#5)
slash-evil
Guest
 
Status:
Posts: n/a
Default Re: Problem again ... - 19-02-2004

You were the best KaCaT , I will list your name into my credit when I publish the bot ^-^ .And for Pierre , you I should really post the file here , I will do that for my after posts !
  
Reply With Quote
Re: Problem again ...
Old
  (#6)
slash-evil
Guest
 
Status:
Posts: n/a
Default Re: Problem again ... - 19-02-2004

Oh Pierre , forgot to tell you , the problem is not made by me , its is "included" in the original src
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com