Usually, a main quest is created for this purpose, which remains active from the beginning to the end of the game (for example, not losing the main hero).
Posts from Scripts for beginners.
Let him check every day to see if it has been captured or not.
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога
Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
Added 4 hours and 43 minutes ago
And how do you make it so that the enemy just stays in the castle, or how do you make it so that when you capture a castle, you've completed the level?
HoMM5MapScriptsEditor
How do I make the enemy just stay in the castle, or how do I make it so that when you capture a castle, you've completed the map?
2. You can do this without scripts; configure the objectives in MapPropertiesTree. There is minimal information about this in the FAQ section of this forum.
Where and how?
Added 1 minute ago
How and where?
SetCombatLight (lightName);