I have been trying many triggers trying to find a method to get it to work, at the moment here is the current trigger I have it set on. I can't test it at the moment, but I was wondering, does this work? If so is it efficient way?
I was going to fix the memory leak later, just wanted to know if this was a working, decent way, or if there are any better.
I was going to fix the memory leak later, just wanted to know if this was a working, decent way, or if there are any better.
Code:
SpawningTestNorth
Events
Map initialization
Conditions
Actions
Player Group - Pick every player in (All players matching (((Matching player) slot status) Equal to Is playing)) and do (Player Group - Add (Picked player) to YesPlaying)
If ((Matching player) Equal to Player 1 (Red)) then do (Unit - Create 1 Sniper for (Picked player) at (Center of NorthBase <gen>) facing Default building facing degrees) else do (Do nothing)
If ((Matching player) Equal to Player 2 (Blue)) then do (Unit - Create 1 Sniper for (Picked player) at (Center of NorthBase <gen>) facing Default building facing degrees) else do (Do nothing)
If ((Matching player) Equal to Player 3 (Teal)) then do (Unit - Create 1 Sniper for (Picked player) at (Center of NorthBase <gen>) facing Default building facing degrees) else do (Do nothing)
If ((Matching player) Equal to Player 4 (Purple)) then do (Unit - Create 1 Sniper for (Picked player) at (Center of NorthBase <gen>) facing Default building facing degrees) else do (Do nothing)
If ((Matching player) Equal to Player 5 (Yellow)) then do (Unit - Create 1 Sniper for (Picked player) at (Center of NorthBase <gen>) facing Default building facing degrees) else do (Do nothing)
If ((Matching player) Equal to Player 6 (Orange)) then do (Unit - Create 1 Sniper for (Picked player) at (Center of SouthBase <gen>) facing Default building facing degrees) else do (Do nothing)
If ((Matching player) Equal to Player 7 (Green)) then do (Unit - Create 1 Sniper for (Picked player) at (Center of SouthBase <gen>) facing Default building facing degrees) else do (Do nothing)
If ((Matching player) Equal to Player 8 (Pink)) then do (Unit - Create 1 Sniper for (Picked player) at (Center of SouthBase <gen>) facing Default building facing degrees) else do (Do nothing)
If ((Matching player) Equal to Player 9 (Gray)) then do (Unit - Create 1 Sniper for (Picked player) at (Center of SouthBase <gen>) facing Default building facing degrees) else do (Do nothing)
If ((Matching player) Equal to Player 10 (Light Blue)) then do (Unit - Create 1 Sniper for (Picked player) at (Center of SouthBase <gen>) facing Default building facing degrees) else do (Do nothing)