Bot trigger_teleport's and teleport_destination's

ArchangelGabe

L1: Registered
Jul 11, 2014
18
0
So I'm not sure if this would be possible, but I went into hammer and I tried to make a trigger_teleport that would teleport bots to another location as soon as they spawned. I saw under the flag tab on the trigger for "NPC's".

With that checked, it wouldn't teleport the bot. I'm not sure if it's the way I set up the teleporter or if the destinations didn't work. Either way, I would like some help on what to do.

To give some back-story, I run an achievement server with 9 idle bots, and originally, the bots and Blu team would spawn in the same location. What I want to do is give Blu their own spawn but still have the bots spawn in their original location.

What I was thinking is have all the spawn locations with their own private teleport triggers under their feet. So when they spawn, they will be teleported to the destination that matched the trigger.


Any advice?
 
Mar 23, 2013
1,013
347
Bots aren't NPCs. well you can't really play them but the engine labels them as clients. So if the teleporter should teleport bots, it will also teleport the human players.
 
D

Digaag Wa Riz

You can filter by targetnames (names you give to the entities in your map). You can give targetnames to players by adding an output to some entity that can be triggered by a player.

For instance, a trigger_multiple can have:

Output: OnTrigger
Target: !activator
Input: AddOutput
Parameters: targetname bot

This will name any entity that is filtered to trigger the trigger_multiple (if you have a filter specified for the trigger_multiple, otherwise it will accept any kind of entity you have specified in the Flags tab) to be named "bot" upon entering it. You can then have a trigger_teleport filtered to only teleport activators named "bot".

NOTE: In order for this to work, only the bots should be allowed to enter the trigger_multiple. If you are making an MvM map then you can place the trigger_multiple in the bots' spawn since bots and players have their own spawn points.
 

henke37

aa
Sep 23, 2011
2,075
515
Hmm, didn't the mvm system add tags to the bots? With a filter entity to allow easy matching.
 

ArchangelGabe

L1: Registered
Jul 11, 2014
18
0
You can filter by targetnames (names you give to the entities in your map). You can give targetnames to players by adding an output to some entity that can be triggered by a player.

For instance, a trigger_multiple can have:

Output: OnTrigger
Target: !activator
Input: AddOutput
Parameters: targetname bot

This will name any entity that is filtered to trigger the trigger_multiple (if you have a filter specified for the trigger_multiple, otherwise it will accept any kind of entity you have specified in the Flags tab) to be named "bot" upon entering it. You can then have a trigger_teleport filtered to only teleport activators named "bot".

NOTE: In order for this to work, only the bots should be allowed to enter the trigger_multiple. If you are making an MvM map then you can place the trigger_multiple in the bots' spawn since bots and players have their own spawn points.


But I'm not making an MvM map, the problem I'm having is the players will spawn where the bots are. I just need to be able to teleport the bots to a different area, out of the player's spawn.
 

worMatty

Repacking Evangelist
aa
Jul 22, 2014
1,257
999
There is no way to distinguish between a player and a bot, since they are set up as the same thing, to logic and the server. All you can do is use a func_nav_prefer to encourage bots to walk somewhere.

The tagging system is used to put bots in groups, so some prefer go a different route. E.G. Some take a flank position, or can capture the gates in Mannhattan. But I believe you can only give a bot a tag using a population file in MvM.

Since bots are essentially the same as players, the only other way I can think of to treat them specially would be to somehow restrict humans and bots to their own teams.

By the way, ArchangelGabe, I believe info_teleport_destination is deprecated in favour of point_teleport, which only requires an ordinary trigger brush to use. Set the entity to teleport to !activator. It is advantageous compared with trigger_teleport as you can do more with it in logic, like using a logic_case to distribute players to a random destination.
 

ArchangelGabe

L1: Registered
Jul 11, 2014
18
0
There is no way to distinguish between a player and a bot, since they are set up as the same thing, to logic and the server. All you can do is use a func_nav_prefer to encourage bots to walk somewhere.

The tagging system is used to put bots in groups, so some prefer go a different route. E.G. Some take a flank position, or can capture the gates in Mannhattan. But I believe you can only give a bot a tag using a population file in MvM.

Since bots are essentially the same as players, the only other way I can think of to treat them specially would be to somehow restrict humans and bots to their own teams.

By the way, ArchangelGabe, I believe info_teleport_destination is deprecated in favour of point_teleport, which only requires an ordinary trigger brush to use. Set the entity to teleport to !activator. It is advantageous compared with trigger_teleport as you can do more with it in logic, like using a logic_case to distribute players to a random destination.

Appreciated mate! You've sparked an idea to just have the bots pushed into a teleporter that will teleport them where I need them to be. Sadly, players on the same team will be pushed as well. But oh well. :p Thanks dude!
 

henke37

aa
Sep 23, 2011
2,075
515
Doesn't bots have some automatic tags?
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
By the way, ArchangelGabe, I believe info_teleport_destination is deprecated in favour of point_teleport, which only requires an ordinary trigger brush to use. Set the entity to teleport to !activator. It is advantageous compared with trigger_teleport as you can do more with it in logic, like using a logic_case to distribute players to a random destination.
I don't think either is depreciated, they both serve different purposes that only one can do, even if there is some overlap.
 

worMatty

Repacking Evangelist
aa
Jul 22, 2014
1,257
999
I believe bots spawn with their class as a tag. I experimented on that basis but didn't get enough proof.

I don't think either is depreciated, they both serve different purposes that only one can do, even if there is some overlap.
My mistake, I believe the use of info_target is encouraged by the Wiki as a destination, instead of info_teleport_destination. Not that it really matters, of course.
 

ArchangelGabe

L1: Registered
Jul 11, 2014
18
0
So I was able to just make the trigger_push and whatnot and it pushes the bots (and afk player) into the teleporter. Would there be a chance to make the destination of the teleporter random? Like have multiple destinations and bots spawn in random spots?
 

henke37

aa
Sep 23, 2011
2,075
515
Have more than one destination with the same entity name. Yes, it's allowed.
 

ArchangelGabe

L1: Registered
Jul 11, 2014
18
0
Have more than one destination with the same entity name. Yes, it's allowed.

I don't think it works though. I had multiple destinations with the same entity name, and they would only teleport to one spot, not any of the others.
 

worMatty

Repacking Evangelist
aa
Jul 22, 2014
1,257
999
I watched a tutorial video a long time ago, that used the same method henke said. But I think the destination entities were actually more teleport brushes. I think the author was mapping for CSS, though. And if you specify another teleport volume as your destination, there is a chance the player will just teleport back, because he walked in to the destination teleporter.

An alternative method for random destinations, is to put point_teleport entities in your destinations, and give them unique names. In the field that contains the name of the entity to teleport, type !activator. Change your trigger_teleport brush into a trigger_multiple. Then make a logic_case, and for each OnCase number, use one of your point_teleport entities, and the command Teleport. Then give your trigger_multiple brush an output - OnStartTouch > logic_case > PickRandom or PickRandomShuffle if you prefer. Each time a client touches the trigger, the logic_case will fire one of the point_teleports, and the !activator will teleport to it.
 

ArchangelGabe

L1: Registered
Jul 11, 2014
18
0
An alternative method for random destinations, is to put point_teleport entities in your destinations, and give them unique names. In the field that contains the name of the entity to teleport, type !activator. Change your trigger_teleport brush into a trigger_multiple. Then make a logic_case, and for each OnCase number, use one of your point_teleport entities, and the command Teleport. Then give your trigger_multiple brush an output - OnStartTouch > logic_case > PickRandom or PickRandomShuffle if you prefer. Each time a client touches the trigger, the logic_case will fire one of the point_teleports, and the !activator will teleport to it.



I tried setting this way up in hammer. Though I'm kinda confused on the !activator part. I've made the logic_case, as well as the trigger_multiple. Made all the spawns point_teleport's as well. Yet I don't understand what you meant by the !activator part.
 

henke37

aa
Sep 23, 2011
2,075
515
!activator is a special expression that can be used instead of a known entity name. It will be replaced at runtime by the engine with which ever entity started the current I/O chain. That is usually a player.
 

ArchangelGabe

L1: Registered
Jul 11, 2014
18
0
!activator is a special expression that can be used instead of a known entity name. It will be replaced at runtime by the engine with which ever entity started the current I/O chain. That is usually a player.

So would I name the logic_case "!activator"? Or the trigger_multiple?