.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   General Bot Coding (http://forums.bots-united.com/forumdisplay.php?f=24)
-   -   in_moveleft and in_moveright not work (http://forums.bots-united.com/showthread.php?t=2093)

Tea 26-06-2004 01:31

in_moveleft and in_moveright not work
 
Hi all, when I use the in_moveright command, the bot move forward just like in_forward, and when I use the in_moveleft command, the bot move backward, and the strafe command also the same, please help. o_O

Whistler 26-06-2004 04:11

Re: in_moveleft and in_moveright not work
 
use parameters in pfnRunPlayerMove() instead. don't use those buttons.

Pierre-Marie Baty 26-06-2004 19:12

Re: in_moveleft and in_moveright not work
 
Actually you *can* use them, it's useful to determine quickly later on whether a player or a bot is strafing left or right. If it's coded properly, masking v.button with IN_MOVELEFT or IN_MOVERIGHT shouldn't change anything in the bot's behaviour, and especially not make it do what you say (identically, it's not IN_FORWARD which makes the bot run forward, but the move_speed). In order to make the bot *actually* strafe, don't forget to set strafe_speed in RunPlayerMove() like Whistler says.

There is an exception: ladders (and possibly water too). In these environments the move_speed and strafe_speed don't count, only the values of v.button are taken in account instead. So you might want to always combine both.


All times are GMT +2. The time now is 13:40.

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