Page 1 of 2

Is there command to kill but not remove a bot?

Posted: Mon Oct 05, 2020 10:03 pm
by tedomedo
I need such command because there's a map which iplay if often but it has a bug, bot sometimes stuck on rail and can't get out. I'd like to kill it using a command and it would respawn. I could use command to change bot's health to 0 if this would kill it too.

Re: Is there command to kill but not remove a bot?

Posted: Mon Oct 05, 2020 11:12 pm
by Buggie
editactor name=...

Re: Is there command to kill but not remove a bot?

Posted: Tue Oct 06, 2020 2:01 am
by Que
perhaps edit the map and remove the apples from the rail so bot cant go there.

what is map called can you find it here: http://medor.no-ip.org/index.php?dir=Maps/

Re: Is there command to kill but not remove a bot?

Posted: Tue Oct 06, 2020 6:52 am
by tedomedo
That train is mover, also i don't know much about Unreal Editor.

Is there no command to kill or set bot's health to 0? We can use "set playerpawn health 100" for player's health. Is there nothing like this for bots?

Re: Is there command to kill but not remove a bot?

Posted: Tue Oct 06, 2020 8:39 am
by Chamberly
Which map is it? I may find a command to make it easy for you.

Re: Is there command to kill but not remove a bot?

Posted: Tue Oct 06, 2020 11:32 am
by Eternity
Maybe this should work: "set bot location (X=0,Y=0,Z=0)". But need to replace "0" by the correct vector coordinates of the destination location... Side effect - if there are more than one bot, it is highly likely they will telefrag each other.

Re: Is there command to kill but not remove a bot?

Posted: Tue Oct 06, 2020 12:29 pm
by tedomedo
That might be good. What should i use instead of bot in command? Bot's name or it's kind?

Re: Is there command to kill but not remove a bot?

Posted: Tue Oct 06, 2020 5:14 pm
by sektor2111
tedomedo wrote: Tue Oct 06, 2020 6:52 am That train is mover, also i don't know much about Unreal Editor.
Depending on train indeed here you might have issues but... paths through train can be removed/adjusted. You don't have to face headaches, point map and ask some other Bot Support in desired thread. Bot has nothing to do with crapped map... poor bot, he must die all time...

Re: Is there command to kill but not remove a bot?

Posted: Wed Oct 07, 2020 2:18 am
by ShaiHulud
This is gnawing at me a bit.

Some time ago when I was playing around with the bots I inserted a crude workaround for this scenario. I believe it went something like this: a timer would fire every 15 seconds (an entirely arbitrary selection) and test the bot's location versus it's last saved location (with a small amount of leeway to allow for the "confused bot" toing-and-froing that goes on when they get caught in a logic trap). If the bot had not moved on from it's last "saved" location, it would call the Pawn.PlayerTimeOut() function on itself, which caused it to "suicide".

So I'm thinking a small mutator that keeps track of the bots, and adds such a timer for each in-game bot, then you wouldn't have to worry about doing this yourself.

Edit: caveat - in my use of this approach, the workaround was only active when the bots were following "attack" orders (because they don't move much when they're defending, and to have it active under those circumstances would cause a gibby mess)

Re: Is there command to kill but not remove a bot?

Posted: Wed Oct 07, 2020 3:43 am
by Que
That sounds like a awesome idea @ShaiHulud create a Mutator to do that for us please.

Re: Is there command to kill but not remove a bot?

Posted: Wed Oct 07, 2020 5:19 am
by sektor2111
Completed by Locking that path for preventing future problems and... if Bot is not in Ambush position, lol. Order attack in deathmatch probably is irrelevant, they can be even freelancers.
I'll stick to fix map instead of loading a mutator in each server with Bots and running trash maps.

Re: Is there command to kill but not remove a bot?

Posted: Wed Oct 07, 2020 9:00 am
by ShaiHulud
I agree that it's a band-aid solution, and proper map fixes would definitely be preferable. But I'll add it here anyway.

This mutator is pieced together from bits of other projects with lots of copying and pasting and only minimal testing. It seems to work, but there are very, very likely to be bugs, so buyer beware. Readme included.

http://www.mediafire.com/file/dtl9z45q4 ... lebots.zip

Edit: by the way, it doesn't work as I described in my previous post, I remembered incorrectly. It just checks whether each bot is stationary once every 15 seconds. Maybe what I suggested previously would work more consistently, but try this first.

Re: Is there command to kill but not remove a bot?

Posted: Wed Oct 07, 2020 9:15 am
by Eternity
There are similar workarounds for bots with orders 'Follow' in some gametypes... Instead of "suicide" in this case they use to translocate to OrderObject.
tedomedo wrote: Tue Oct 06, 2020 12:29 pmWhat should i use instead of bot in command? Bot's name or it's kind?
"Bot" is the class name. "Set" command works only with class names, not with actor names. Problem is that need to know coordinates (we don't know the map name), depending on the map "0" will give needed result as well...

Re: Is there command to kill but not remove a bot?

Posted: Wed Oct 07, 2020 9:38 am
by ShaiHulud
Eternity wrote: Wed Oct 07, 2020 9:15 am There are similar workarounds for bots with orders 'Follow' in some gametypes... Instead of "suicide" in this case they use to translocate to OrderObject.
That sounds like it might be preferable, they could be relocated to the player's location, perhaps.

Re: Is there command to kill but not remove a bot?

Posted: Wed Oct 07, 2020 10:07 am
by Buggie
What about second post in this topic?

Also another solution - write own mutator and use it for kill bots if this is server, not local play.