Skip to content

Posts from Current questions and answers regarding the map editor.

5.0 (12 ratings)
User Avatar
Auto-translated
I can’t attack him, but the hero’s scripted name is correct.
In reply to &T&T&Twreqnd
User Avatar
Auto-translated
&T&T&Twreqnd
I can't attack him, but the hero's scripted name is correct.

So, when you interact with the unit, it doesn't attack you?
User Avatar
Auto-translated
No, I apologize, the hero's script name was incorrect. I've fixed it, and now the script for leveling up works, but the one for the demon doesn't.
In reply to &T&T&Twreqnd
User Avatar
Auto-translated
&T&T&Twreqnd
No, I apologize, the script name for the hero is incorrect. I have corrected it, and now the script for leveling up works, but not the one for the demon.

Then, in the script for the demon, change the script name of the hero to the correct one. The error might be in that.
User Avatar
Auto-translated
I also fixed it there.
In reply to &T&T&Twreqnd
User Avatar
Auto-translated
&T&T&Twreqnd
I also fixed it in that one.

Show me the corrected script, and I'll try to figure it out.
User Avatar
Auto-translated
function Heroes()
Trigger(OBJECT_TOUCH_TRIGGER, "Devil", nil);
AddHeroCreatures("Nicolai", 3, 20);
MessageBox("/Maps/SingleMissions/Opolchenie/Devil.txt");
PlayObjectAnimation("Devil", "happy", ONESHOT_STILL);
end;
Trigger(OBJECT_TOUCH_TRIGGER, "Devil", "Heroes");
SetObjectEnabled("Devil",nil);

now everything works
and how do I make them join the squad after that?
In reply to &T&T&Twreqnd
User Avatar
Auto-translated
&T&T&Twreqnd
function Heroes()
Trigger(OBJECT_TOUCH_TRIGGER, "Devil", nil);
AddHeroCreatures("Nicolai", 3, 20);
MessageBox("/Maps/SingleMissions/Opolchenie/Devil.txt");
PlayObjectAnimation("Devil", "happy", ONESHOT_STILL);
end;
Trigger(OBJECT_TOUCH_TRIGGER, "Devil", "Heroes");
SetObjectEnabled("Devil",nil);

now everything works
and how do I make them join the hero's army after that?

AddHeroCreatures("Nicolai", 3, 20); - this command gives creatures to the Hero.
Where the number 3 is the ID of the creatures. You can find them in the manuals.

function Heroes()
AddHeroCreatures("Nicolai", 3, 20);
MessageBox("/Maps/SingleMissions/Opolchenie/Devil.txt");
PlayObjectAnimation("Devil", "happy", ONESHOT_STILL);
RemoveObject("Devil");
end;
Trigger(OBJECT_TOUCH_TRIGGER, "Devil", "Heroes");
SetObjectEnabled("Devil",nil);

Try this.
User Avatar
Auto-translated
Everything is working, but how can I find the ID of an entity? What are manuals? Perhaps our conversation isn't over yet, but I already want to thank you. You've done so much to help me, and not everyone would put in that much effort, so I want to say thank you!
In reply to &T&T&Twreqnd
User Avatar
Auto-translated
&T&T&Twreqnd
Everything works, but how do I find the ID of an entity?

In the Editor Documentation folder, you'll find many manuals. HOMM5_A2_IDs_for_Scripts – that's the one you need. At least, that's what it's called for me.
User Avatar
Auto-translated
Thank you! That’s all the questions I have.
In reply to &T&T&Twreqnd
User Avatar
Auto-translated
&T&T&Twreqnd
Thank you! That's all the questions I have.

;)
Auto-translated
There's an easier way. This site contains the IDs for all creatures, spells, and artifacts. (Sorry for the spam.)
In reply to serovoy
User Avatar
Auto-translated
serovoy
There's a simpler way. This site contains the IDs of all creatures, spells, and artifacts. (Sorry for the spam.)

That's even better.

Added 50 minutes later
&T&T&Twreqnd
It all works, but how do I find out the ID of a creature? What are manuals?

Perhaps our conversation isn't over yet, but I want to thank you now. You've done so much to help me, not everyone would put up with it for so long, so I want to say thank you!!!

thank you;)
Auto-translated
QUESTION. When I load a map in the editor, the terrain and most objects appear blurry and lack clarity. Is there a way to fix this?

Statistics

Welcome our newest member: Emil