Skip to content
User Avatar
#3009
Auto-translated
Ment
By the way, you only have one check there.

And are the quest settings for q5 correct? Maybe it's initiating the loss on its own.
It would also be good to make it so that the lostDragon function exits the loop when dragon==0, so there are no constant, pointless checks.

Indeed, now that the Hive city has been captured, the quest fails, and the game is lost.
But I still haven't solved the other problem. The q5 quest is correct in the editor, and the kind_manual is in the conditions; I don't think the root of the problem is there.
And how do I stop this loop?
I've made a few minor edits to this function in the hope of fixing it, but it still fails. Just in case, I'll post it again so you don't have to look for it.

SetRegionBlocked ('CheckAstrid', true)

function lostDragon() ---- Check for dragon loss
while 1 do
sleep ( 10 );
if GetHeroCreatures("Ohtarig", 83) == 0 and dragon == 1 and
SetRegionBlocked('CheckAstrid', false) then
SetObjectiveState("q5", OBJECTIVE_FAILED, 1);
sleep ( 10 );
Loose();
break
end;
end;
end;
startThread (lostDragon)

And, essentially, at the moment when the dragon should disappear from the army, the quest to save it should fail, but the game should continue.
function PokaAstrida()
SetRegionBlocked ('CheckAstrid', false, 1)
dragon = 0
RemoveHeroCreatures('Ohtarig', 83, 1)
StartDialogScene("/Maps/SingleMissions/ChoiseOTW1/Test/DialogScene.xdb#xpointer(/DialogScene)")
sleep(5)
StartCombat('Ohtarig', nil, 1, 41, 1, nil, nil, nil, nil)
sleep(5)
MessageBox("/Maps/SingleMissions/ChoiseOTW1/MagiPoka.txt");
sleep(5)
SetObjectiveState("q5", OBJECTIVE_FAILED);
Trigger(REGION_ENTER_AND_STOP_TRIGGER , "Corrupted", nil);
sleep(5)
RemoveObject('lich1')
RemoveObject('lich2')
RemoveObject('lich3')
end

Trigger(REGION_ENTER_AND_STOP_TRIGGER , "Corrupted", 'PokaAstrida');

Here, everything works until you exit the battle. After that, I think there's a check for the presence of the unit - it's not there - you lose.
Автор карт:
Долина расхитителей
Выбор мира

Statistics

Welcome our newest member: artem

Users Online 2 users 1509 guests