.:: Bots United ::.

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

RealHunk 22-11-2008 20:07

Little question
 
I want to make bot use grenade as Official csbot do it. I mean: choose grenade, then hold fire and, when see an enemy, unhold fire. Can someone give me a clue?

Whistler 23-11-2008 13:21

Re: Little question
 
set the IN_ATTACK bit for bot's input at the starting of round (after switching to grenade by issuing a client command), and unset it when enemy is seen will do the job.

RealHunk 27-11-2008 20:11

Re: Little question
 
Thanks. Another question. Does there any way to know what weapon enemy or teammate has?

The Storm 28-11-2008 18:22

Re: Little question
 
Yep check the FOV(field of view) for enemies, get a pointer to their edict and checkout the weapon information that you have stored from the messages.

RealHunk 29-11-2008 21:22

Re: Little question
 
Yea, bot see an enemy...then we should do this:
pEdict->pBotEnemy, then ->botweapon and so?

RealHunk 30-11-2008 12:40

Re: Little question
 
Thanks. I did it!

The Storm 01-12-2008 18:15

Re: Little question
 
You are welcome. :)

RealHunk 18-04-2009 21:48

Re: Little question
 
Another question, guys. Some bots have ability to throw nades in dangerous places.
I need some help to understand how they do this and release smth similar by myself.

The Storm 19-04-2009 18:57

Re: Little question
 
Well I guess that your bot is based on PodBot or other PodBot clone. As I remember ( I didn't deeped in to the navigation system ) the waypoints have danger factor depending on how much times a bot has been killed on a specific place. You can search the waypoints that have the highest danger factor and make the bots fire nades on them. :)

RealHunk 19-04-2009 20:00

Re: Little question
 
Well, no podbot, you know, RealBot is my choose. That's not my bot. I just make it better for me. And problem is that i can't make this guy throw nade if he has it in his hands, only if he see enemy he press fire and do his black work.
Due to this fact he was killing by smb. It looks very noob like:(
I had even tried to do like this:
-bot randomly choose nade
-hold fire key
-then unhold all keys
But it didn't...
I know that there is smth very easy, but i can's find the path.


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

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