Skip to content
User Avatar
#1022
Auto-translated
JORAJAN
yes, the garrison
no, the point is not that it becomes mine
but that the entire army that I defeated is reborn
but now under my command
naturally, it cannot be taken back
plus, it doubles in size

you give your "gates" a name.
for example, vorota
vorotaF is a function that will be executed when an object is captured
then you declare a trigger
Trigger(OBJECT_CAPTURE_TRIGGER, "vorota", "vorotaF");

then you write the function itself

vorotaF(nPrevOwnerID, nNewOwnerID, sHeroName, sObjectID)
nPrevOwnerID - player number - the former owner
nNewOwnerID - the current owner
sHeroName - the name of the hero who captured the gates
sObjectID - the name of your gates (vorota)

these parameters are passed to the function after the garrison's owner changes. If it doesn't matter who captured the garrison, you can leave the parentheses empty.

to add creatures to the garrison, use the command
AddObjectCreatures( sObjectName, nGreatureID, nCount );

where sObjectName is the name of the gates (specified in quotes!!!)
nGreatureID is the creature ID (there is a document with all IDs in the editor's documentation)
nCount is the number of creatures to be added.

Trigger(OBJECT_CAPTURE_TRIGGER, "vorota", nil ); - resetting the trigger, also in the function body!!!

and don't forget to put end at the end;

that's all. If it is important which player and hero captures, specify all parameters in the function's parentheses and write a conditional statement in the function body if ....... end;
Кампании для Heroes V 3.1 (Трилогия):

Пробуждение зла
Нашествие из Преисподней
Смена эпох

Скачать все кампании одним архивом: Яндекс.Диск Google.Диск

You can download the set of 3 Campaigns (English version) here


Одиночные сценарии Heroes V 3.1:


Незваные гости
Красный кристалл
Синий кристалл
Закат тьмы

Мультиплеерные карты для Heroes V 3.1:

Легендарная война
Сердце вулкана
Передел мира

Statistics

Welcome our newest member: artem

Users Online 1 users 1520 guests