1 of 2 Spawn Points on Map Spawn (random)

Beetle

L9: Fashionable Member
Aug 17, 2008
627
178
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?
 

nik

L12: Fabulous Member
Aug 14, 2009
987
564
did you use that output to enable/disable all the spawns in the other area they won't spawn in?
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
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.
 

Beetle

L9: Fashionable Member
Aug 17, 2008
627
178
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.

logiccase.png


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.
 

Beetle

L9: Fashionable Member
Aug 17, 2008
627
178
So Boojum, you're essentially saying if I was trying to manipulate any other entity then my logic would work?
 

Beetle

L9: Fashionable Member
Aug 17, 2008
627
178
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.
 

Beetle

L9: Fashionable Member
Aug 17, 2008
627
178
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)?
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
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.
 

Beetle

L9: Fashionable Member
Aug 17, 2008
627
178
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)
 

Beetle

L9: Fashionable Member
Aug 17, 2008
627
178
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.