Bot trigger_teleport's and teleport_destination's

Discussion in 'Mapping Questions & Discussion' started by ArchangelGabe, Aug 14, 2014.

  1. ArchangelGabe

    ArchangelGabe L1: Registered

    Messages:
    18
    Positive Ratings:
    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?
     
  2. Lampenpam

    aa Lampenpam

    Messages:
    994
    Positive Ratings:
    329
    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.
     
  3. ArchangelGabe

    ArchangelGabe L1: Registered

    Messages:
    18
    Positive Ratings:
    0
    Would it be possible to rig up something custom?
     
  4. Digaag Wa Riz

    Digaag Wa Riz L3: Member

    Messages:
    121
    Positive Ratings:
    83
    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.
     
  5. henke37

    aa henke37

    Messages:
    1,836
    Positive Ratings:
    420
    Hmm, didn't the mvm system add tags to the bots? With a filter entity to allow easy matching.
     
  6. ArchangelGabe

    ArchangelGabe L1: Registered

    Messages:
    18
    Positive Ratings:
    0

    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.
     
  7. ArchangelGabe

    ArchangelGabe L1: Registered

    Messages:
    18
    Positive Ratings:
    0
    Not sure, any idea what to do to test it?
     
  8. worMatty

    aa worMatty Repacking Evangelist

    Messages:
    1,071
    Positive Ratings:
    832
    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.
     
  9. ArchangelGabe

    ArchangelGabe L1: Registered

    Messages:
    18
    Positive Ratings:
    0
    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!
     
  10. henke37

    aa henke37

    Messages:
    1,836
    Positive Ratings:
    420
    Doesn't bots have some automatic tags?
     
  11. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,516
    I don't think either is depreciated, they both serve different purposes that only one can do, even if there is some overlap.
     
  12. worMatty

    aa worMatty Repacking Evangelist

    Messages:
    1,071
    Positive Ratings:
    832
    I believe bots spawn with their class as a tag. I experimented on that basis but didn't get enough proof.

    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.
     
  13. ArchangelGabe

    ArchangelGabe L1: Registered

    Messages:
    18
    Positive Ratings:
    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?
     
  14. henke37

    aa henke37

    Messages:
    1,836
    Positive Ratings:
    420
    Have more than one destination with the same entity name. Yes, it's allowed.
     
  15. ArchangelGabe

    ArchangelGabe L1: Registered

    Messages:
    18
    Positive Ratings:
    0
    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.
     
  16. ArchangelGabe

    ArchangelGabe L1: Registered

    Messages:
    18
    Positive Ratings:
    0
    Bump. Any advice?
     
  17. worMatty

    aa worMatty Repacking Evangelist

    Messages:
    1,071
    Positive Ratings:
    832
    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.
     
  18. ArchangelGabe

    ArchangelGabe L1: Registered

    Messages:
    18
    Positive Ratings:
    0


    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.
     
  19. henke37

    aa henke37

    Messages:
    1,836
    Positive Ratings:
    420
    !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.
     
  20. ArchangelGabe

    ArchangelGabe L1: Registered

    Messages:
    18
    Positive Ratings:
    0
    So would I name the logic_case "!activator"? Or the trigger_multiple?