And if I want a certain hero to receive an artifact when the yellow player defeats the green player, how should I write that?
______________
Preparing the "Crushing" map for the dwarves. Map progress - 30%
If the green player is player number 3 and the yellow player is player number 4, you can do it like this (you can change the numbers if needed):
Trigger(PLAYER_REMOVE_HERO_TRIGGER, 3, "RemoveF");
function RemoveF(looser, winner)
if GetObjectOwner(winner)==4 then
GiveArtefact(winner, nArtID); --// nArttID - ID of the artifact, you can find it and other IDs in the Editor Documentation folder, in the HOMM5_IDs_for_Scripts file.
Trigger(PLAYER_REMOVE_HERO_TRIGGER, 3, nil);
end;
end;
Added 2 minutes later
What are the if-then, do blocks, and functions?
Пробуждение зла
Нашествие из Преисподней
Смена эпох
Скачать все кампании одним архивом: Яндекс.Диск Google.Диск
You can download the set of 3 Campaigns (English version) here
Одиночные сценарии Heroes V 3.1:
Незваные гости
Красный кристалл
Синий кристалл
Закат тьмы
Мультиплеерные карты для Heroes V 3.1:
Легендарная война
Сердце вулкана
Передел мира