Posts from Current questions and answers regarding the map editor.
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?
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.
I also fixed it in that one.
Show me the corrected script, and I'll try to figure it out.
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?
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.
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.
Thank you! That's all the questions I have.
;)
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
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;)