Teleport out [COLOR="Green"]//everything that is green isn't a part of the trigger. it's just my comments[/COLOR]
Events
Unit - A unit Dies
Conditions
(Arena <gen> contains (Triggering unit)) Equal to True[COLOR="Green"] //Arena <gen> is a region i placed over the arena[/COLOR]
Actions
Set unitgroup = (Units in Arena <gen> matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an ally of (Owner of (Triggering unit))) Equal to True)))
[COLOR="Green"]//unitgroup is a unitgroup variable[/COLOR]
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in unitgroup) Equal to 0 [COLOR="Green"]//this part makes sure that all units inside of the reagion that are allied to the dead unit are dead[/COLOR]
Then - Actions
Custom script: call DestroyGroup(udg_unitgroup) [COLOR="Green"]//this cleans up the leak of the unit group[/COLOR]
Set unitgroup = (Units in Arena <gen>)
Unit Group - Pick every unit in unitgroup and do (Actions)
Loop - Actions
Unit - Move (Picked unit) instantly to (Center of (Playable map area))
Else - Actions
Custom script: call DestroyGroup(udg_unitgroup)
Ok, its almost like Grymlax has written, but instead they come at the same place, they should come 2 different places, 1 to there own shops, and the other to there own shops too.