.:: 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
Hold the key ???
Old
  (#1)
slash-evil
Guest
 
Status:
Posts: n/a
Default Hold the key ??? - 02-03-2004

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 ? ???

Last edited by slash-evil; 02-03-2004 at 08:25..
  
Reply With Quote
Re: Hold the key ???
Old
  (#2)
BAStumm
Member
 
BAStumm's Avatar
 
Status: Offline
Posts: 138
Join Date: Jan 2004
Location: Spokane, WA USA
Default Re: Hold the key ??? - 02-03-2004

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....







Last edited by BAStumm; 02-03-2004 at 13:24..
  
Reply With Quote
Re: Hold the key ???
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: Hold the key ??? - 02-03-2004

@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)



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: Hold the key ???
Old
  (#4)
slash-evil
Guest
 
Status:
Posts: n/a
Default Re: Hold the key ??? - 04-03-2004

@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;
}
  
Reply With Quote
Reply


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

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