Question concerning bots

KarmaPolice

L3: Member
Jul 25, 2009
108
52
Thanks to the magic of point_servercommand, it's a simple task to spawn bots in a map. But is it possible to have a logic_relay fire when you kill a bot, for instance? I'm guessing the answer is no, but I figured I'd ask.
 

Freyja

aa
Jul 31, 2009
2,994
5,813
If you surround the area where the bots will be with a trigger_multiple, every time a bot is killed, the OnEndTouch output will fire. Likewise, a OnTouch will fire evertime one is spawned. You can use the OnEndTouch to fire a logic relay, which can then do whatever you want, including a counter.
 

KarmaPolice

L3: Member
Jul 25, 2009
108
52
That's a pretty clever idea, and I'll probably be able to use it. It just has one shortcoming: it also fires the OnEndTouch output when the player leaves the area or dies. Thanks, though!
 

treythepunkid

L4: Comfortable Member
Sep 8, 2008
157
79
That's a pretty clever idea, and I'll probably be able to use it. It just has one shortcoming: it also fires the OnEndTouch output when the player leaves the area or dies. Thanks, though!

Why not set the bots to ONLY spawn on the red team, then have the trigger_multiple
filtered to the red team?

That way any red/bot that dies triggers you're output.
 

Freyja

aa
Jul 31, 2009
2,994
5,813
That would work. You could really cheat, I'm not even sure if this works but...

Make the bots spawn in a closed room, surrounded by a trigger_multiple. Make it fire with OnTouch, set the entity name to !activator which will be well, the bot that activated it, then SetName to something like, idiot. Then in the main field, have the large counting trigger_multiple have a filter_name that only allows entities named idiot, aka the bots, activate it.
I'm not sure if it works however, and treythepunkid's way would be safer.
 

KarmaPolice

L3: Member
Jul 25, 2009
108
52
Yeah, Trey's way worked dandy. Thanks a ton.

Unfortunately, I'm beginning to think Valve's bots aren't yet bright enough to do what I want them to. Oh well. :p