Skip to content
User Avatar
#3840
Auto-translated
Azgalor

BlueHeavenHero, I understand... Then, let's rewrite the function like this:

function TownCaptured( oldowner, newowner )
if ( newowner == PLAYER_1 ) and ( IsHeroAlive("Christian") ~= true ) then
StartDialogScene("/DialogScenes/FallenKnight/S3/DialogScene.xdb#xpointer(/DialogScene)")
sleep(1)
DeployReserveHero("Christian", 98, 108, 0)
SetObjectiveState("prim5", OBJECTIVE_COMPLETED, 1)
SetObjectiveState("prim6", OBJECTIVE_ACTIVE, 1)
sleep(3)
MoveHero("Christian", 126, 139, -1)
end
if newowner == PLAYER_2 then
SetObjectiveState("prim5", OBJECTIVE_FAILED, 1)
sleep(10)
Loose()
end
end

Trigger( OBJECT_CAPTURE_TRIGGER, "castle", "TownCaptured" );

Using the same logic, we'll attach a trigger to the loss of heroes for the player who owns your hero. When the hero is lost, a function will be launched that checks if the player lost the correct hero, and then a video will play or something else will happen if needed.

If the battle is launched through StartCombat, there is an argument that allows you to launch a function after the battle is over. Write a function with text that will be launched after the battle and display the text.

I fixed everything in the message, but there are problems with the video... It not only plays BEFORE Vittorio's attack, but also SetObjectiveState doesn't work, and this accursed Vittorio doesn't attack!

Мои карты:
Падший рыцарь
Сердце Хаоса

Мои моды:
Визуальные:
Изменение внешнего вида героев-некромантов
Существа-жители и кое-что по мелочи в городах Ордена Порядка, Некрополиса и Инферно

NCF-существа:
Странствующие рыцари
Наемники

Statistics

Welcome our newest member: leyu