And how do you do the opposite? How do you use a script to place an army without a hero on the map? In the sense that a monster is standing there, a player kills it, and after a while, the script places another monster in that spot. I hope I explained it clearly? Just please explain in as much detail as possible, as I am a beginner.
Posts from Help for the Heroes 4 Map Editor.
You can't do that with an army – if it's destroyed, all the scripts associated with it will be lost as well. The only thing I can suggest is to place a garrison and configure it so that after a certain number of days after it's captured, it's transferred to a neutral player and an army is added to it. I'm too lazy to explain how to do this, so I'll just post a map with an example – it has a garrison that becomes neutral exactly one week after it's captured by the red player, and one air elemental is added to it. You can place a different army or change the respawn period by replacing the seven in the appropriate window with a different number.
Справочник по НоММ-4 http://handbookhmm.ru/pamyatka-dlya-heroes-iv.html
Памятка по НоММ-3 http://handbookhmm.ru/pamyatka-dlya-homm-iii.html
и HotA http://handbookhmm.ru/vyishla-obnovlennaya-pamyatka-dlya-homm-iii-hota.html