In reply to dudkisc2:
do you want to rebuild, replace or revive them?
for rebuild(AI rebuilds the specified unit types) there are 2 rebuild triggers. one is working with object class (unit, building) and one with unit types. it requires active AI I think.
for replace (change a unit to other unit defined by unit types also stats can be moved too)there is a trigger that changes a specified unit(last created, picked unit, triggering unit, value, variable, etc.) with another unit of the given unit type. for exmaple changes a placed marine to marauder. or can change all marine in a unit group to marauders. for tha last example you must put the marines in to unit group.
for revive, (revive the unit that died)there is a trigger that revives a specified unit. Important that the trigger only work by itself if the a revive is instant after the unit dies, and uses the dying position as revive point. If you want some time before it happens, you must put the dying unit into a variable, and later ony use this variable in the unit part. Also there is 2 hero revive function but I didn't tested it yet. In star craft 2 the revive works with any units, not just with heroes, as in warcraft 3 where only heroes can be revived, or at least it was like this before reforged.
1.30857459978767