Skip to content
User Avatar
#3217
Auto-translated
diff=GetDifficulty();
function bitva_1(heroname, objectname)
if heroname == "Raelag" then
StartCombat(heroname, nil, 3, 6, 5+2*diff, 6, 5+2*diff, 6, 5+2*diff, nil);
sleep(5);
RemoveObject('q7');
RemoveObject('q8');
RemoveObject('q9');
end;
end;
Trigger(OBJECT_TOUCH_TRIGGER,'q7','bitva_1');
Trigger(OBJECT_TOUCH_TRIGGER,'q8','bitva_1');
Trigger(OBJECT_TOUCH_TRIGGER,'q9','bitva_1');
I think I did it correctly, but the hero ends up with 9 armor, and I need 7. As I understand it, 5+2*diff means 5 armor + the amount multiplied by the difficulty. If the difficulty is Recruit, then diff=1, and it turns out that on Recruit difficulty, there will be 7 armor. If the difficulty is Warrior, then diff=2, and then it's already 5+2*2=9. Can you please explain what the error is here? Thank you in advance.

Added 25 minutes later
I would also like to ask something else. Does the OpenCircleFog function exist? It reveals the fog of war, and with it, you can reveal part of the map. Is it possible to use some function to make it not reveal, but close the fog of war, thus preventing the hero from seeing certain areas that he has already visited, and so that this part of the map is also not visible on the minimap in the lower left corner of the game?

Statistics

Welcome our newest member: wayal