.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   General Bot Coding (http://forums.bots-united.com/forumdisplay.php?f=24)
-   -   Don't jump ? (http://forums.bots-united.com/showthread.php?t=964)

slash-evil 03-03-2004 14:56

Don't jump ?
 
One qeustion , is setting this below bit can make the bot don't jump ?

pEdict->v.button &= ~(IN_JUMP);

I don't think it does , because although I place it into my code , the bot also jump ,is the code wrong , or what , any ideas ???

Pierre-Marie Baty 03-03-2004 16:00

Re: Don't jump ?
 
The code you posted will clear the IN_JUMP bit of v.button. That is, if this bit is set to 1, it will set it back to 0.

Yes, this code can force the bot not to jump, but you have to ensure that nothing sets the IN_JUMP bit again later on in the code, AFTER this bit. The pEdict->v.button fields are only used when pfnRunPlayerMove() is called, not before - so ensure nothing breaks what you've done in between.

bluesy 03-03-2004 16:02

Re: Don't jump ?
 
Try moving that line as close as possible to pfnRunPlayerMove() so you won`t override IN_JUMP by mistake.

*someone beat me to it :D

slash-evil 04-03-2004 00:16

Re: Don't jump ?
 
See this one

Code:

if((BotUsesSniper(pBot) && pBot->iStates & STATE_SEEINGENEMY))
{
        pEdict->v.button |= IN_DUCK;
        pBot->f_move_speed = 0.0;
        pBot->f_sidemove_speed = 0.0;
        pBot->f_move_speed=0; pBot->f_sidemove_speed=0;
    pEdict->v.button |= IN_ATTACK2;
        pEdict->v.button |= IN_ATTACK;
        pEdict->v.button &= ~(IN_JUMP);
}

Are you think the pEdict->v.button &= ~(IN_JUMP); is at the right place ?

*note I tested this code , it worked , it is a improved sniper code done by me
, it is a older version , I have a newer version of the code , so I just need
to make sure the bot don't jump *

Pierre-Marie Baty 04-03-2004 10:06

Re: Don't jump ?
 
Well if it works I suppose it's okay...

But I wouldn't do things like that if it was my own bot. In fact what you are doing is that you are correcting a wrong behaviour by adding the opposite behaviour on top of it. I call this "patching".
You should better try to figure out WHY your bot jumps when using a sniper rifle and make it NOT press the IN_JUMP key then.

Ah I know, it's more difficult. :)

slash-evil 04-03-2004 13:46

Re: Don't jump ?
 
Yeah , you're right , I'm studying the code now !

botman 04-03-2004 15:36

Re: Don't jump ?
 
Why are you pressing both attack buttons at once (both IN_ATTACK and IN_ATTACK2)?

botman

Rick 04-03-2004 23:05

Re: Don't jump ?
 
BLEH useless post :S

Rick 04-03-2004 23:06

Re: Don't jump ?
 
And setting move_speed and side_speed twice to zero :D
I think if you just set IN_ATTACK2 once when he starts to snipe is enough 8)

slash-evil 05-03-2004 09:54

Re: Don't jump ?
 
Ha , it is just for testing !

slash-evil 05-03-2004 09:57

Re: Don't jump ?
 
@botman : IN_ATTACK2 mean I want them to scope &
IN_ATTACK mean I want them to fire

and you know the results , they snipe very inhumanly , very fast and accurary , but it is funny because you will see them scope NONSTOP ! But anyways , the code is just for testing ! And Rick I agree , the code is useless , that is why I post the code here for some lamers to use them !

Pierre-Marie Baty 05-03-2004 10:57

Re: Don't jump ?
 
Quote:

Originally Posted by slash-evil
And Rick I agree , the code is useless , that is why I post the code here for some lamers to use them !

Oh, and you're a l33t h@x0r perhaps ? My bet is that you yourself weren't even able to understand what this code was doing before someone explained it to you. So regarding to who is the real lamer here, follow my look.

Such an attitude of yours is not encouraged on the Bots United forums. Stay modest, and we may eventually forget that you have little knowledge and mastering in this domain and that you are a newcomer to bot coding TRYING TO LEARN c++. You prove it each time you post.

It doesn't prevent us to give you some help, as you can see.

>:(

BTW, your signature is aggressive and tiresome.

slash-evil 05-03-2004 11:13

Re: Don't jump ?
 
Oops , overwhelming again , but don't worry , I won't do it again ! btw , I will change my signature too , its a little bit too ugly , like fooling all the bot coders !

slash-evil 05-03-2004 11:15

Re: Don't jump ?
 
@PMB how is it , is it OK now ?

Pierre-Marie Baty 05-03-2004 11:20

Re: Don't jump ?
 
You didn't understand. Although this is just my opinion, what is aggressive in your sig is the VISUALS. I mean, 50 smilies grinning altogether ? What's the point ? It just hurts the eyes, it distracts from reading the posts. The eye is inevitably caught by these horrible yellow things, sorry there's nothing I can do!

It's just my opinion of course, you're free to wear the sig you want.

slash-evil 05-03-2004 11:25

Re: Don't jump ?
 
ohoh , my eng is bad , I don't understand , but I will change it on your way !

slash-evil 05-03-2004 11:30

Re: Don't jump ?
 
okay , here is my new sig


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

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