1 of 2 Spawn Points on Map Spawn (random)

Discussion in 'Mapping Questions & Discussion' started by Beetle, Sep 15, 2010.

  1. Beetle

    Beetle L9: Fashionable Member

    Messages:
    627
    Positive Ratings:
    141
    Hello, I would like to have a team either spawn in one set location or another, and that should be decided as soon as the map loads. I want either the first or second area to be picked at random and not change until the map is loaded at another time.

    I've tried using a logic_auto OnMapSpawn to PickRandom on a logic_case. That didn't work, but I think I wasn't going about it the right way.

    Help please?
     
  2. nik

    nik L12: Fabulous Member

    Messages:
    987
    Positive Ratings:
    246
    did you use that output to enable/disable all the spawns in the other area they won't spawn in?
     
    • Thanks Thanks x 1
  3. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,535
    It's not working because players spawn immediately, before any entity logic can occur. You can try a game_forcerespawn (trigger it after the random selection), but I don't remember if that just respawns players or triggers a full entity system refresh.
     
  4. Beetle

    Beetle L9: Fashionable Member

    Messages:
    627
    Positive Ratings:
    141
    Yes. This is essentially all I did. What isn't shown is that I did a logic_auto to target the entity below (logic_case) using the PickRandom output.

    [​IMG]

    I was hoping the logic_auto would randomly pick either case01 or case02 and therefore trigger one of the above sets of outputs, but I think my logic in my head is messed up.
     
  5. Beetle

    Beetle L9: Fashionable Member

    Messages:
    627
    Positive Ratings:
    141
    So Boojum, you're essentially saying if I was trying to manipulate any other entity then my logic would work?
     
  6. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,535
    Yes
     
    • Thanks Thanks x 1
  7. Beetle

    Beetle L9: Fashionable Member

    Messages:
    627
    Positive Ratings:
    141
    OK. Thanks for the help. I'll let you know if using a game_forcerespawn added to the second set of outputs works. If so, that's good enough.
     
  8. Beetle

    Beetle L9: Fashionable Member

    Messages:
    627
    Positive Ratings:
    141
    Ok, so I tested it out by using a button instead of logic_auto just to get fast randomness. Every time it chose the first case. Why could that be? What should I be putting in the case field in this case (no pun intended)?
     
  9. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,535
    How did you determine it was picking the first, by spawning, or by the console? (developer 2 will spew all I/O that goes on)
    It may be an issue with the spawn setup rather than the case.
     
  10. Beetle

    Beetle L9: Fashionable Member

    Messages:
    627
    Positive Ratings:
    141
    Well I've greatly simplified it so I can test it fast in a test map. All I have are 2 spawnpoints with different names recieving the above inputs (plus now a game_forcerespawn)
     
  11. Beetle

    Beetle L9: Fashionable Member

    Messages:
    627
    Positive Ratings:
    141
    Ok so you probably would have told me to do this had I given my complete example.

    I haven't tested yet, but I'm going to following this post. What I'm going to do is just provide 2 rounds that are identical (more or less). Since if you set their priority the same, 1 will be chosen at random, then I think I can get the teams to spawn in different locations based on which round I want.

    Just posting this in case someone other than me was interested.