Random and Set Spawn Points possible?

Discussion in 'Mapping Questions & Discussion' started by cownaetion, Apr 6, 2008.

  1. cownaetion

    cownaetion L1: Registered

    Messages:
    32
    Positive Ratings:
    1
    I'm trying to make a duel map for 2v2 and I have four spawn points, two for blue/red respectively. When dueling though the spawn points alternate so you know which point their going to spawn at. Is there anyway to randomize this?

    Also if possible, how can I have the players spawn where I want them when they first join the map (or map starts depending on mode) and then after that first spawn let it be random. Any help would be appreciated, thanks!
     
  2. Armadillo of Doom

    aa Armadillo of Doom Group Founder, Lover of Pie

    Messages:
    949
    Positive Ratings:
    614
    For the randomness, I think you just need to make the func_respawnroom the same name in each one. And their associated info_player's of course. If you want them to start in Spawn A, then disable the player spawns in B when the map starts. Add an output, after the first spawn, or 5 second, etc. enable the info_player_teamspawn's in B.
     
  3. cownaetion

    cownaetion L1: Registered

    Messages:
    32
    Positive Ratings:
    1
    Hmm, that seems to make sense. Thanks for the info. I'll try it out when I can and let you know how it goes.
     
  4. WarMecha

    WarMecha L2: Junior Member

    Messages:
    64
    Positive Ratings:
    12
    It might be useful for you to note also that the order you create the spawn points in within hammer is the order you spawn in when playing the map, at the last spawn point you then cycle back to the first and so on.
     
    • Thanks Thanks x 2
  5. trainRiderJ

    trainRiderJ L5: Dapper Member

    Messages:
    203
    Positive Ratings:
    31
    Do you have a source? Not that I don't trust you, it's just that I could have sworn they were random. I know that each time I compile and test my map I spawn in a random spawnpoint.
     
  6. Narkissus

    Narkissus L5: Dapper Member

    Messages:
    228
    Positive Ratings:
    9
    That does seem to be how it is, its by order placed not randomness, atleast in my map it is.
     
  7. phatal

    phatal L6: Sharp Member

    Messages:
    259
    Positive Ratings:
    21
    I've noticed the same as well. Not random at all.
     
  8. cownaetion

    cownaetion L1: Registered

    Messages:
    32
    Positive Ratings:
    1
    Yes, the order seems to be how their placed and not random. Is there any entity that can produce a random number? If so I wonder if it'd be possible to input the number into a switch-like statement. If the number is say even, it disables spawn B and enables A and vice versa if it is odd. That possible?
     
  9. WarMecha

    WarMecha L2: Junior Member

    Messages:
    64
    Positive Ratings:
    12
    Unfortunately there isn't a way to generate a random number, however you might want to look at logic_case. You could use this to randomly trigger up to 16 outputs, so you could for instance target a logic_relay which in turn then targets all the spawn points, enabling one and disabling the rest. That would give you scope for 16 spawn points per side, so you could always have 2 logic_case entities for instance meaning 2 spawn points where active at any one time - probably a good thing imo. Or just string the logic_case entities together, but the second logic_case would then have a much lower likely hood of enabling its spawn points.

    As for the switch you were describing, you can do this with logic_compare, but you can only cover three cases here. If I remember correctly you can look for equal to, not equal to, greater than and less than, so using equal to, greater than and less than would give you 3 different cases.
     
  10. cownaetion

    cownaetion L1: Registered

    Messages:
    32
    Positive Ratings:
    1
    Lot of output/inputs there but thanks for the info. I'll see what I can come up with and if successful will post back.
     
  11. Thymopat

    Thymopat L1: Registered

    Messages:
    19
    Positive Ratings:
    1
    Old topic But did you find how it works?
     
  12. radarhead

    aa radarhead Hands out ratings like cheap cigars

    Messages:
    1,002
    Positive Ratings:
    533
    Necro! But, I believe that since any active spawn points are already randonized, just have the extra spawns start disabled and enable them a few seconds after round start.