You'll need to trigger it if you want them to revive the Hero, if you want it to replace pre-placed units use the line
call SetBuildUnitEx(i,j,k, UnitID)
It won't build past the number if there are already pre-placed units but will replace them if they're killed.
Alternatively you can use the
call CampaignDefendersEx(i,j,k, UnitID)
command.