Raised This Month: $51 Target: $400
 12% 

Bot not moving.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SpirT
Senior Member
Join Date: Sep 2018
Location: Portugal
Old 07-07-2021 , 10:47   Bot not moving.
Reply With Quote #1

Hey,

I tried to spawn a bot according to a spawn point. The BOT does spawn but it doesn't move. Do I have to do anything else to make the bot to move?

PHP Code:
On plugin start:
RegConsoleCmd("sm_bot"Command_BOT);

...

public 
Action Command_BOT(int clientint args)
{
    
int bot CreateFakeClient(defaultBotName);
    if (
bot != 0)
    {
        
ChangeClientTeam(botCS_TEAM_T);
        
CS_RespawnPlayer(bot);
        
TeleportEntity(botopponentOriginopponentEyeAngleNULL_VECTOR);
    }

On Round End all bots are kicked. Any idea to fix it?

This was tested on de_mirage, so there is a .nav created for the bot to move.

OpponentOrigin and EyeAngle are stored in a float.
__________________

Last edited by SpirT; 07-07-2021 at 10:49.
SpirT is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 07-07-2021 , 11:07   Re: Bot not moving.
Reply With Quote #2

bot_add_t
Bacardi is offline
SpirT
Senior Member
Join Date: Sep 2018
Location: Portugal
Old 07-07-2021 , 11:28   Re: Bot not moving.
Reply With Quote #3

Quote:
Originally Posted by Bacardi View Post
bot_add_t
Replacing CreateFakeClient with ServerCommand("bot_add_t") will fix the problem (then respawning him and teleporting him to the location)?
__________________
SpirT is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 07-07-2021 , 12:16   Re: Bot not moving.
Reply With Quote #4

Try it.
If game is counter-strike, then map need good *.nav file for bots, otherwise those not know where to go.

In cs:go, some settings could stop bots moving, in competitive game mode... ?
Bacardi is offline
SpirT
Senior Member
Join Date: Sep 2018
Location: Portugal
Old 07-07-2021 , 12:24   Re: Bot not moving.
Reply With Quote #5

Quote:
Originally Posted by Bacardi View Post
Try it.
If game is counter-strike, then map need good *.nav file for bots, otherwise those not know where to go.

In cs:go, some settings could stop bots moving, in competitive game mode... ?
The game is CS:GO. The server is set to casual mode.
__________________
SpirT is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 07-07-2021 , 12:32   Re: Bot not moving.
Reply With Quote #6

Here you can look CS:GO server commands (like bot_add_t)

And CS:GO server cvars (like bot_stop)
__________________
Do not Private Message @me
Bacardi is offline
SpirT
Senior Member
Join Date: Sep 2018
Location: Portugal
Old 07-07-2021 , 12:36   Re: Bot not moving.
Reply With Quote #7

Quote:
Originally Posted by Bacardi View Post
Here you can look CS:GO server commands (like bot_add_t)

And CS:GO server cvars (like bot_stop)
I'll give a try to bot_add_t and then I'll leave here the feedback
__________________
SpirT is offline
SpirT
Senior Member
Join Date: Sep 2018
Location: Portugal
Old 07-09-2021 , 06:54   Re: Bot not moving.
Reply With Quote #8

Quote:
Originally Posted by Bacardi View Post
Here you can look CS:GO server commands (like bot_add_t)

And CS:GO server cvars (like bot_stop)
I haven't tested yet your suggestion, but I am with some thoughts on my head...
If I use bot_add_t, it won't add the bot instantly. A bot will only join after I run the command around 2 / 3 times. Wouldn't that be a problem while running the command on the server? Should I run and loop through the players trying to find a FakeClient and if there is, the plugin won't run the command anymore until the round ends?

On mirage, the nav is the standard the comes with the server. The bot should move because nothing is modified (maybe the bot movement is set to freeze and I have to unfreeze him?)

PHP Code:
SetEntityFlags(client, (GetEntityFlags(client) & ~FL_FROZEN)); 
Any ideas?
__________________
SpirT is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 07-10-2021 , 10:59   Re: Bot not moving.
Reply With Quote #9

Quote:
Originally Posted by SpirT View Post
I haven't tested yet your suggestion, but I am with some thoughts on my head...
If I use bot_add_t, it won't add the bot instantly. A bot will only join after I run the command around 2 / 3 times. Wouldn't that be a problem while running the command on the server? Should I run and loop through the players trying to find a FakeClient and if there is, the plugin won't run the command anymore until the round ends?
To get bot appear in game, it depends settings.

cmd bot_add
cmd bot_add_t
cmd bot_add_ct
bot_join_team (any, T, CT)
- bot_add commands increase bot count. bot_quota will change because of this.
- Also depend mp_autoteambalance and mp_limitteams, will new bot add in team or not.

cmd bot_kick ( |all|t|ct|<difficulty>|<name>)
- decrease bot count, will change bot_quota

* This cause your 2 / 3 times bot add command
bot_quota_mode
- There are 3 or even fourth settings for this.
"normal" would keep bot count steady.
"fill" would keep total player count steady.
"match" would keep 1:? ratio of humans to bots
Then there is "competitive", you need use in competitive game mode.

bot_quota
- Depends, which bot_quota_mode is, you set amount here.

bot_join_after_player 1
- Bots appear in game when human player join in team

bot_join_delay 0
- How many seconds later, after human player joined in team, bots appear.


mp_join_grace_time 0 max. 30
- How many seconds after round_freeze_end, new player is allowed to spawn in game.

If you add bot much later in game after round freeze end, you can respawn in game with CS_RespawnPlayer


Quote:
Originally Posted by SpirT View Post
On mirage, the nav is the standard the comes with the server. The bot should move because nothing is modified (maybe the bot movement is set to freeze and I have to unfreeze him?)

PHP Code:
SetEntityFlags(client, (GetEntityFlags(client) & ~FL_FROZEN)); 
Any ideas?
If you teleport bot and respawn, are you sure it is not stuck on ground, object or wall ?
Make sure you have not at least
bot_stop 1
bot_zombie 1


I tested bots in de_mirage and it works fine.


If you still try to use CreateFakeClient, it will create dummy bot. It won't move, no bot AI work on it. It's old bot thing from HL2 game.
__________________
Do not Private Message @me

Last edited by Bacardi; 07-10-2021 at 11:02.
Bacardi is offline
SpirT
Senior Member
Join Date: Sep 2018
Location: Portugal
Old 07-10-2021 , 11:35   Re: Bot not moving.
Reply With Quote #10

Quote:
Originally Posted by Bacardi View Post
To get bot appear in game, it depends settings.

cmd bot_add
cmd bot_add_t
cmd bot_add_ct
bot_join_team (any, T, CT)
- bot_add commands increase bot count. bot_quota will change because of this.
- Also depend mp_autoteambalance and mp_limitteams, will new bot add in team or not.

cmd bot_kick ( |all|t|ct|<difficulty>|<name>)
- decrease bot count, will change bot_quota

* This cause your 2 / 3 times bot add command
bot_quota_mode
- There are 3 or even fourth settings for this.
"normal" would keep bot count steady.
"fill" would keep total player count steady.
"match" would keep 1 ratio of humans to bots
Then there is "competitive", you need use in competitive game mode.

bot_quota
- Depends, which bot_quota_mode is, you set amount here.

bot_join_after_player 1
- Bots appear in game when human player join in team

bot_join_delay 0
- How many seconds later, after human player joined in team, bots appear.


mp_join_grace_time 0 max. 30
- How many seconds after round_freeze_end, new player is allowed to spawn in game.

If you add bot much later in game after round freeze end, you can respawn in game with CS_RespawnPlayer



If you teleport bot and respawn, are you sure it is not stuck on ground, object or wall ?
Make sure you have not at least
bot_stop 1
bot_zombie 1


I tested bots in de_mirage and it works fine.


If you still try to use CreateFakeClient, it will create dummy bot. It won't move, no bot AI work on it. It's old bot thing from HL2 game.
Ohh, okey, that might explain why it wasn't moving. I'll give it a try, thanks!
__________________
SpirT is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:39.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode