.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   General Bot Coding (http://forums.bots-united.com/forumdisplay.php?f=24)
-   -   Hold the key ??? (http://forums.bots-united.com/showthread.php?t=952)

slash-evil 02-03-2004 07:20

Hold the key ???
 
When we set IN_DUCK , does it mean the bot just "press" the duck key ONCE or HOLD IT DOWN ? I need to know the answer , plz reply ! :(

and one more

if(pBot->f_spawn_time+0.0<gpGlobals->time)
{
bBotMovement = TRUE;
}

*why I can't space at the start of the line bBotMovement = TRUE;? ???:( *

I add this to my bot code (PODbot 2.6 src) and the bot will move while buying (tested , worked) , but after I add this part of code , the bot seem like don't know how to attack with knife in jasonmode (they use knife normaly in every situation , except in knifemod) , is there any conflict or problem with the code ? ???

BAStumm 02-03-2004 12:23

Re: Hold the key ???
 
Code:

if(pBot->f_spawn_time+0.0<gpGlobals->time)
{
bBotMovement = TRUE;
}

That code means they will move immediately doesn't it? should you set it to some future time? ie:

Code:

if(pBot->f_spawn_time+1.0<gpGlobals->time)
perhaps? Give them at least a tenth of a sec or summat to do whatever task you want done? granted I allowed a full second but you get my point....

Pierre-Marie Baty 02-03-2004 14:14

Re: Hold the key ???
 
@slash-evil: to make a bot hold a key down, make the bot press this key each frame (for example, if you set IN_DUCK each frame, the bot will act as if it was holding it down).

BTW: to add spaces at the start of C/C++ lines, enclose them within [ code ] and [ /code ] tags (without the spaces) :)

slash-evil 04-03-2004 00:29

Re: Hold the key ???
 
@BAStumm , thanks , I just found a solution for this problem , but thanks for
your reply

@PMB , thanks , but I can't understand this

BTW: to add spaces at the start of C/C++ lines, enclose them within [ code ] and [ /code ] tags (without the spaces) :)

is it like this ?

Code:

#include <iostream.h>
int main()
{
    cout <<"Hello World!\n";
    return 0;
}



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

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