Posts from Current questions and answers regarding the map editor.
Please tell me how to practically implement the following idea: a hero kills a certain monster on the map, and as a result, his morale drops to an unacceptable level... say, -5, for example, or even less.
function Bon(hero)
sleep(3);
GiveHeroBattleBonus(hero, 1, -7);
end;
Trigger(OBJECT_TOUCH_TRIGGER,'mon','Bon');` Here, 'mon' is the script name of the monster or hero you are attacking, 1 indicates that the battle spirit will change, and -7 means it will decrease by 7.Added 15 minutes later
Forgot to mention: the GiveHeroBattleBonus function only works in version 3.1.
I have another question. In my case, the letter opens after the monster is killed. How can I make it so that the letter appears first, and then the battle starts, or the monster can be recruited?
How do you create main and secondary quests in the editor? I tried using the prophet's hut as well. It seems like everything is set up correctly, but I can't assign it to the monster that needs to be killed!:smile04:
I have another question. In my case, the letter opens after the monster is killed. How do I make it so that the letter appears first, and then the battle or the option to recruit the monster?
SetObjectEnabled('mon',nil);
function Bat(hero)
MessageBox(GetMapDataPath()..'mes.txt');
MakeHeroIntractWithObject(hero,'mon');
end;
Trigger(OBJECT_TOUCH_TRIGGER,'mon','Bat');
mes.txt -- the text of the message, mon -- the script name of the monster.
Hello everyone, fans of Heroes 5!)) I have a question. I want to create my own campaign, but when I try to add a map to the campaign list, the "Create Company" function doesn't see it; it's not in the dropdown list. The map is a single-player map with a quest, and it works – meaning I can enter and play it in the game's scenarios. What do I need to do for the campaign editor to recognize my map? Please advise.
