Hello again! 👻 I have another question: is it possible to move the progress counter change out of scripts into a text file? I know this works with MessageBox, after opening the 3rd campaign map for Ornella and Arantir. There it looks like this:
addedCreatures = ZOMBIE_COUNT - difLevel*5;
MessageBox({"Maps/Scenario/A2C1M3/MessageBox10_GraveYardZombie.txt"; quantity = addedCreatures});
and in the text file itself:
"Вы наняли на этом погосте <value=quantity> зомби!"
What I want is to use something similar for SetObjectiveProgress. I wrote the script:
red_troops_count = 0;
function red3()
print("Проверяем сколько челов собрал Влад");
if red_troops_count ~= 3 then
red_troops_count = red_troops_count + 1;
print("Влад собрал ", red_troops_count ," демонов из 3");
sleep(1);
SetObjectiveProgress( "test_obj", red_troops_count );
else
if red_troops_count == 3 then
SetObjectiveProgress( "test_obj", red_troops_count );
print("Влад собрал всех демонов. Arrivederci Signor Giocatore!");
end;
end;
end;
for i = 1, 3 do
Trigger( OBJECT_TOUCH_TRIGGER, "rh"..i, "red3" )
end;And the quest progress text:
Собрано <value=red_troops_count> из 3 демонов
The script works (though I wish someone would teach me how to place 'end's properly, because sometimes +100500 scenario restarts just to check for script errors start to get tedious), but the quest progress text doesn't pick up that very progress, leaving the space between "Collected" and "of" empty.