Skip to content
#1291
Auto-translated
aaa... damn, I messed up. Thanks.
By the way, I've made some changes to the campaign function that recalculates the number of defeated enemies. But now it works strangely. Can you tell me what's wrong?

Trigger( COMBAT_RESULTS_TRIGGER, "combat_results" );

combat_result_last = -1;
c = 1
i = 0

function combat_results( c )
local we = -1
if GetSavedCombatArmyPlayer(c,1) == PLAYER_1 then
we = 1

if we == 1 then
if GetSavedCombatArmyHero(c,we) == 'Berein' then
local stackscount = GetSavedCombatArmyCreaturesCount(c,0);
creature,creaturescount,died = GetSavedCombatArmyCreatureInfo(c,0,i);
AddHeroCreatures('Berein' , 29 , died)
end;
end;

end
if GetSavedCombatArmyPlayer(c,0) == PLAYER_1 then
we = 0
end;
combat_result_last = c;
end;


--------

Statistics

Welcome our newest member: den

Users Online 3 users 1524 guests