![]() |
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 ??? |
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. |
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 |
Re: Don't jump ?
See this one
Code:
if((BotUsesSniper(pBot) && pBot->iStates & STATE_SEEINGENEMY)) *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 * |
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. :) |
Re: Don't jump ?
Yeah , you're right , I'm studying the code now !
|
Re: Don't jump ?
Why are you pressing both attack buttons at once (both IN_ATTACK and IN_ATTACK2)?
botman |
Re: Don't jump ?
BLEH useless post :S
|
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) |
Re: Don't jump ?
Ha , it is just for testing !
|
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 ! |
Re: Don't jump ?
Quote:
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. |
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 !
|
Re: Don't jump ?
@PMB how is it , is it OK now ?
|
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. |
Re: Don't jump ?
ohoh , my eng is bad , I don't understand , but I will change it on your way !
|
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.