Trigger 1:
Condition:
Bring(<player>,<atleast/atmost/exactly>,<number>,<unit>,<location>)
Action:
SetSwitch 2
Trigger 2:
Condition:
Switch2 is set
Always
Action:
RemoveUnitAtLocation(<number of units>, <unit>, <player>, <location>)
CreateUnit(<number of units>, <unit>, <location>, <player>)
SetSwitch 1
ClearSwitch 2
PreserveTrigger
Trigger 3:
Conditions:
Switch1 is set
Bring(<player>,<atleast/atmost/exactly>,<number>,<unit>,<location>) //for the unit you would put the unit that you just created
Always
Action:
RemoveUnitAtLocation(<number of units>, <unit>, <player>, <location>) //unit you just created
CreateUnit(<number of units>, <unit>, <location>, <player>)//unit that was removed before
SetSwitch 2
ClearSwitch 1
PreserveTrigger