.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   General Bot Coding (http://forums.bots-united.com/forumdisplay.php?f=24)
-   -   Buying weapons routines (http://forums.bots-united.com/showthread.php?t=2922)

sten 06-11-2004 10:11

Buying weapons routines
 
How can I make my bot to buy things. I have altered botmans code to make a new cs bot. So far I havent seen anything that refers buying. I tought that when I put engine_debug flag on, I would get some info, but couldn't do that, because there wasnt such a flag in engine.cpp. I made a new FireWeapon function wich works so far, but it's kind of hard to chooce weapons when bot only have a pistol and knife. :P

I planned that BotThink function would call "BotBuyWeapon" function if bot is in buying area and for example don't have a primary weapon. So now I would need to know what kind of message should be sent, or better if there is some free routines for this, those would be nice, so I would not have to "invent wheel again"..

thx: NiCo

PS: Couldn't find answers with that awesome search this time.. ;)

@$3.1415rin 06-11-2004 10:22

Re: Buying weapons routines
 
maybe you just look at the buy routines in some open source bots, like joebot, realbot, racc ( maybe ), and all the others ...

the code in joebot is in dlls/CBotCS.cpp bool CBotCS :: BuyWeapon(void)

sten 06-11-2004 12:29

Re: Buying weapons routines
 
Didn't know there are opensource bots. That joebot is easy to undestand because it's object kind of construct.. I like it, I like it a lot! Was very usefull for my purpose. Thanks @$3.1415rin, that reply saved my day!

-NiCo

Pierre-Marie Baty 06-11-2004 13:28

Re: Buying weapons routines
 
omg, sten, you're the first human being I see to actually understand Joebot

congratulations :P

@$3.1415rin 06-11-2004 13:36

Re: Buying weapons routines
 
hey pierre, what do you say to understanding joebotxp ? I guess you once had a look at the sources :)

Rifleman 08-11-2004 16:37

Re: Buying weapons routines
 
I think joebot are not very hard to read (not easy too) , but I have to manually add some spaces between lines :D

sten 08-11-2004 18:28

Re: Buying weapons routines
 
Is there a class diagram of joebot available somewhere.. Wouldn't fit on one A4 I think :D

@$3.1415rin 08-11-2004 18:55

Re: Buying weapons routines
 
no, for joebot there isnt one ... although it's wouldnt be that big, compared to joebotxp. JoeBOT is only in parts sort of OO, therefore just a few classes, most of them belong to the neural network simulator. if I'd find a really nice uml editor ( which'd be affordable ) I could do one


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

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