Skip to content

Current questions and answers regarding the map editor.

User Avatar
#459
Auto-translated
nonstop
So, you can't reduce intelligence, which is a shame:( A mod for such a small map probably won't help, although it does help prevent fleeing, if I understand correctly? That's good, because sometimes they run away without a fight. And regarding the first question (need to reduce), if you can, please answer a little more precisely, where and how to enter the values. And also, do the names need to be in English?
Done.
h={'Ving','Straker','','','','','','','','','','','','','','','','','','','',''}--for 20 heroes on the map (and two starting ones), if you need to allow more, you need to add more
--write ,''. If there are more starting heroes, you need to add them at the beginning.
hq=0;
i=0;
nh=0;
k=-800;--the turn will be reduced by 800 points
function NewHero(hero)
hq=hq+1;
h[hq]=hero;
ChangeHeroStat(hero,7,k);
end;
function NewDay()
i=1;
while i<=hq do
ChangeHeroStat(h,7,k);
i=i+1;
end;
end;
function MinusHero(hero)
while (i<=hq) do
if(h==hero) then
while(i
h=h[i+1];
end;
i=hq;
end;
i=i+1;
end;
hq=hq-1;
end;
ChangeHeroStat(h[1],7,k);
ChangeHeroStat(h[2],7,k);
hq=2;--if there are 2 heroes on the map at the beginning, otherwise, you need the same functions and hq=3
Trigger(PLAYER_ADD_HERO_TRIGGER,1,'NewHero');--if player 1 hires a hero
Trigger(PLAYER_ADD_HERO_TRIGGER,2,'NewHero');--for player 2. If there is player 3, then the same function is needed for him, but replace 2 with 3
Trigger(NEW_DAY_TRIGGER,'NewDay');
Trigger(PLAYER_REMOVE_HERO_TRIGGER,1,'MinusHero');--one of player 1's heroes is defeated
Trigger(PLAYER_REMOVE_HERO_TRIGGER,2,'MinusHero');
This is how it works for me. But this is not a 15% reduction, but a reduction of 800 points (set by the parameter k). And it should work for all other parameters.

Added 1 minute ago
The names should be in English, yes.
 

К А
Стикеры GBF в Telegram