.:: Bots United ::.

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

slash-evil 19-02-2004 12:35

Problem again ...
 
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 ?

slash-evil 19-02-2004 13:05

Re: Problem again ...
 
And one question this is

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

mean the bot will attack and then duck ?

Pierre-Marie Baty 19-02-2004 13:22

Re: Problem again ...
 
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...

KaCaT 19-02-2004 13:28

Re: Problem again ...
 
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.

slash-evil 19-02-2004 13:32

Re: Problem again ...
 
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 !

slash-evil 19-02-2004 13:40

Re: Problem again ...
 
Oh Pierre , forgot to tell you , the problem is not made by me , its is "included" in the original src


All times are GMT +2. The time now is 05:13.

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