Skip to content
User Avatar
#2849
Auto-translated
AstralLein
I encountered such a problem...

There is an enemy hero (mobile). His death leads to victory in the scenario... but if this hero dies during the AI's turn (he crashes into the player), then after the cutscene and everything else, instead of victory, the game displays a console error "No player!", and the turn change freezes. If the player attacks the hero himself, then everything works correctly.

Does anyone know how to fix this? Please!)))

Here is the function itself:

Trigger(PLAYER_REMOVE_HERO_TRIGGER, 2, "TheEnd")

function TheEnd(hero)
if hero == "RedHeavenHero05" then
StartDialogScene(path.."DialogScenes/DialogFinal/DialogScene.xdb#xpointer(/DialogScene)")
sleep(5)
SetObjectiveState("Final", OBJECTIVE_COMPLETED)
SetObjectiveState("NecroTown", OBJECTIVE_COMPLETED)
SetObjectiveState("ArantirLive", OBJECTIVE_COMPLETED)
sleep(10)
Win()
end
end

I had a similar problem; if the enemy hero crashed into the player, the game would freeze (BlockGame). I solved it by making my event, which occurred when this hero died, happen during the turn of the third, leftmost player, and everything became okay. But if you only have 2 active players, then I don't know how this could help.
Автор карт:
Долина расхитителей
Выбор мира

Statistics

Welcome our newest member: dylanyamaha