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:
Any ideas? If what I'm asking isn't clear, please let me know so I can further clarify.
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.