Trick to making bots work with "shared" spawn room?

Discussion in 'Mapping Questions & Discussion' started by Draco18s, Mar 28, 2012.

  1. Draco18s

    Draco18s L9: Fashionable Member

    Messages:
    622
    Positive Ratings:
    136
    So I have a Payload map with a single center respawn room that has its ownership transfer from red to blue after the cart reaches a certain point.

    Once it does, however, the blue bots almost never leave the spawn room, unless a red bot/myself happens nearby and triggers their attacking code (and they follow me out).

    Is there some trick to getting the bots to realize that this is THEIR spawnroom and not an enemy spawn room? As I've noticed that bots do have the behavior of not trying to path into enemy spawn rooms unless the round was won.
     
  2. Jeremy

    Jeremy L11: Posh Member

    Messages:
    829
    Positive Ratings:
    251
    Does the func_spawnroom change from RED to BLU? Or does the RED one disable and a BLU one enable? Does the final RED spawnroom have a func_spawnroom that is enabled?

    Bots tend to act a bit buggy unless both teams have at least one func_spawnroom each.
     
  3. Draco18s

    Draco18s L9: Fashionable Member

    Messages:
    622
    Positive Ratings:
    136
    I'm setting the team, via the SetTeam input, changing the one func_spawnroom from one team to the other. I have a bit of delay between when red loses it and when blue gains it* (as well as killing anyone inside the room, for good measure). Red gains a new spawn room when they lose this middle one, and blue loses their original spawn (disabled) when they gain this one (happens in the same game tick).

    All of the info_player_teamspawn entities are team-switched the same way.

    The thing is, SOME bots are ok with the change (demomen, for instance) others are not (spies are notoriously at Not Leaving).

    *Step 1: disable
    Step 2: kill anyone inside
    Step 3: SetTeam (blue)
    Step 4: Enable
     
  4. Draco18s

    Draco18s L9: Fashionable Member

    Messages:
    622
    Positive Ratings:
    136
    As an update, I ended up rebuilding the room a bit (making it deeper) and ended up with a slightly...different problem.

    Red bots: leave the room just fine
    Blue bots: cluster in the corner nearest the exit (if there wasn't a WALL IN THE WAY*) as if they're ignoring the nav mesh.

    *The exit is to the right and up a ramp to the left, so the bots cluster in the corner to the left, which is below the ramp's walkable surface.

    Edit:
    Altered the nav, such that the corner contains nav mesh zones with connections leading only away from the corner (that is, a lot of little areas with one-way connections).

    The bots will still navigate into the corner and get stuck.
     
    Last edited: Apr 7, 2012
  5. Jeremy

    Jeremy L11: Posh Member

    Messages:
    829
    Positive Ratings:
    251
    You could try modifying the nav mesh - it's probably causing the bots to think they can go that way when they can't.
     
  6. grazr

    aa grazr Old Man Mutant Ninja Turtle

    Messages:
    5,436
    Positive Ratings:
    3,568
    That's not the right way to do it and often when there are I/O commands available, they are redundant features that have been replaced by actual features within the respective entity's options. Better to use badwater as a reference. Shared spawns are awkward to deal with when you don't have the benefit of a round switch to reset your logic.
     
  7. Draco18s

    Draco18s L9: Fashionable Member

    Messages:
    622
    Positive Ratings:
    136
    I'd tried, they ignored it.

    Thanks, I'll take a look.
    Edit:
    Badwater doesn't help, as the two teams never share a spawn room.
     
    Last edited: Apr 8, 2012