Author Topic: Bot spawning preferences  (Read 365 times)

Does anyone know of an easy way to control when certain bots spawn and when they shouldn't be spawned? I've tried the bot spawn events but for some reason they don't work reliably. I've also tried the bot spawn range addon but the detection range is too short and I can't change the radius for some reason. Any help would be appreciated.

I'm no coder or anything, but I was able to do this by going into the Bot_Blockhead zip, opening bot_base.cs file, and scrolling down until you see bot spawn options. From there, you can set it so that the bot will not spawn unless within a certain distance from a player. You can even set the range. BUT, of you don't wanna do that, you can use the base events in the game.

OnBotSpawn - Self (Not Bot!)- setBotType - None

This will make it so that the bot won't even spawn. You could then make event triggers to do so.

OnPlayerTouch - (named brick of bot) - setBotType - (whatever type of Bot you want it to spawn as)

You can even make it so that the bot won't spawn after you kill it.

OnBotDeath - Self - setBotType - None

It takes a bit more work, but I think I was able to make the beginning of a Serious Sam Map like this, and it worked great! But I do remember that I had to set the tick time for some events to 500 otherwise they wouldn't trigger.

Hope this helps, fellow Bot loving brother!

You could also use zone events to trigger certain bots to spawn, etc.


When loading your map
Delay: 1000 - OnBotSpawn - Self (Not Bot!)- setBotType - None
Despawns the bot when loading the map and keeps them despawned until you spawn them.

When killing a bot.
OnBotDeath - Self - setBotType - None

For spawning
OnPlayerEnterZone (NameBrick being the bot spawn) SetEventEnabled (The number of which event SetBotType None is assigned to, for example, the first event is 0)
Delay: 50 - OnPlayerEnterZone (NameBrick being the bot spawn) SetBotType - Default

Quoting Jack here he pretty much nailed how I do it, but modified his quote a bit to give you a better understanding of how to do it.

Thanks a lot everybody, I never thought to use the self event.