![]() |
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
|
Re: in_moveleft and in_moveright not work
use parameters in pfnRunPlayerMove() instead. don't use those buttons.
|
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.