Closed Ethorbit closed 8 years ago
The team to assign bots is what ever teams are available on your game mode.
For example Garry's Mod sandbox has the following Teams to choose from. https://github.com/garrynewman/garrysmod/blob/master/garrysmod/lua/includes/modules/team.lua
It depends on what game mode your running but "GUEST" is not a valid team.
Set the config value to this
Team_to_Assign_Bots = false
And I think it will have the desired effect you are after ?
Sorry, I forgot to mention that I tried = false, and like I said, the bots are in the game and everything, yet they are always dead according to ULX. Doing !frespawn * (kills player and respawns them) only shows I died as if the bots do not exist, yet they show on the [TAB] menu and server status. I also tried TEAM_Spectator, Team_Unassigned,etc and same result.
Not sure if these errors matter (I get many errors and the addon source still works properly) but this is what I get on !frespawn *: ` [ERROR] addons/fakeplayers/lua/autorun/server/sv_fakeplayers.lua:403: bad argument #1 to 'SetTeam' (number expected, got nil)
So the bots are standing there(alive) but yet ULX does not recognize that they are alive is that what you are getting at ?
I'm saying that something in the code prevents the bots from respawning. I tried a script to make them respawn constantly, and literally I see them poof at spawn for a split second in different spawn points (like right after they respawn they're dead again) I need them to be standing there (alive) though
If I remove fakeplayers, reload server, spawn a bot it is no longer always dead.
Run the code in sandbox (without any other game modes or addons) and see if it works in all my testing they spawn in just fine with
Team_to_Assign_Bots = false
You need to eliminate potential external script issues because allot of scripts / addons do not support NextBots nor understand what to do if the player in question is a bot.
Also i will add if they appear and then disapear it means something is using the KillSilent() command on them.
I tried it already, but I'm trying it again my server is restarting now with the new change: Team_to_Assign_Bots = false If it doesn't work, I will try without addons running like you suggested thank you.
They work now I have no clue what happened.
Was you changing the
Team_to_Assign_Bots =
Value without restarting the server you should always do restarts when editing non cvar config values.
I always restart when changing stuff in my server. For some reason the bots also do +duck and using HB Controller SWEP (it lets me control bots too) it'll stand up and then when I exit hb controller the bot toggles duck again.
I know it isn't your addon causing this, but any idea how to correct that?
Try this code :
hook.Add("StartCommand", "StartCommand-Control-Bots", function(ply,cmd) if ply:IsBot() then --Clear movements and state. cmd:ClearMovement() cmd:ClearButtons() end end)
//EDIT : To include If IsBot
You're the best Thank you so much!
They seem to not respawn after death when disabling their controls, but oh well
The force them to respawn.
timer.Create("Timer-Loop-Respawn-Bots", 1, 0, function()
--For all bots.
for p,ply in pairs(player.GetBots()) do
--If the bot is dead
if ply:IsBot() and ply:Health() <= 0 then
--Respawn the bot
ply:Spawn()
end
end
end)
It works perfectly! :+1: https://www.youtube.com/watch?v=hdyQlcnv0nY
mind explaining where to put the code for making them respawn? or post the code and tell me where to put it my bots are in the unassigned category and not spawning in
mind explaining where to put the code for making them respawn? or post the code and tell me where to put it my bots are in the unassigned category and not spawning in
Yes because these posts were made 4 years ago.
I have edited the file to make their team GUEST. They will be guests, and the player count works; HOWEVER, they do not spawn.
Idk if this is an issue or if the addon was made to keep bots from spawning, but I at least want to make the bots look idle so someone doesn't join and find out no one is on, after looking in the entire map.
I need help! If you help me, this is my new favorite script...