Random Starting Locations With the Same Starting Locations?

Squeekems

TH.net Regular
Reaction score
11
So, I'm working on this simple arena map, and I realized that the same starting locations for every round gets monotonous. I can't figure out how to do this:
I want all the player's units to spawn in a random starting location at the start of each round, but I don't want to have players spawning next to each other.
This is how I'm spawning the units, currently:
Code:
For each (Integer A) from 2 to 9, do (Actions)
    Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Player((Integer A))) slot status) Equal to Is playing
            Then - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Player((Integer A))) is in Active_Round) Equal to False
                    Then - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                Player_Race[(Integer A)] Equal to 0
                            Then - Actions
                                Unit - Create 1 Human (1) for (Player((Integer A))) at ((Player(Temp_Int)) start location) facing Default building facing degrees
                            Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                Player_Race[(Integer A)] Equal to 1
                            Then - Actions
                                Unit - Create 1 Orc (1) for (Player((Integer A))) at ((Player((Integer A))) start location) facing Default building facing degrees
                            Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                Player_Race[(Integer A)] Equal to 2
                            Then - Actions
                                Unit - Create 1 Undead (1) for (Player((Integer A))) at ((Player((Integer A))) start location) facing Default building facing degrees
                            Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                Player_Race[(Integer A)] Equal to 3
                            Then - Actions
                                Unit - Create 1 Night Elf (1) for (Player((Integer A))) at ((Player((Integer A))) start location) facing Default building facing degrees
                            Else - Actions
                        Player Group - Add (Player((Integer A))) to Active_Round
                    Else - Actions
            Else - Actions
                Set Temp_Group = (Units owned by (Player((Integer A))))
                Unit Group - Pick every unit in Temp_Group and do (Actions)
                    Loop - Actions
                        Unit - Remove (Picked unit) from the game

Any ideas? If what I'm asking isn't clear, please let me know so I can further clarify.
 

Squeekems

TH.net Regular
Reaction score
11
I didn't implement any random starting locations. I'll check out the thread later and check out if your triggers will do what I'm looking for. Thanks for the response!

EDIT: I checked out your map. Sure, I could do that, but I want to maintain these 8 primary starting locations.
 

tommerbob

Minecraft. :D
Reaction score
110
You could just create several regions, and have each player spawn in one of the regions each round.
 

Squeekems

TH.net Regular
Reaction score
11
I wanted to avoid adding 8 different Regions for one function. I'd rather have a completely random point for every player.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top