Posts from Current questions and answers regarding the map editor.
Auto-translated
__________________________________
nginx/0.8.54
_STOP_TRIGGER,"region name","function name"); and MesssageBox("path to the text file");
In general, it should look like this:
function function name()
MessageBox("/Maps/SingleMissions/your map name/text name");
end;
Trigger(REGION_ENTER_AND_STOP_TRIGGER,"region name","function name");
And also:
Do not start function names with numbers.
For convenience, when using MessageBox, you can replace the entire path to the file with GetMapDataPath().."file name" when specifying the path. This is convenient because if you rename the map, the path will become invalid.
Place the text file with the message in the map. You can open the map using a zip archiver. Also, the file should be in Unicode format and in .txt format.
Should the file with the text message be in Unicode or txt format?
Added 3 minutes later
I have a question: how can I use scripts to remove an object, such as a tree or a peasant's house?
Is it possible to download the map editor separately for the add-on featuring orcs, without downloading the add-on itself?
Added 25 minutes later
Can scripts be used to remove objects from the map, such as trees?
Added 3 minutes later
I have a question: how can I use scripts to remove an object, such as a tree or a peasant's house?
2) RemoveObject("script name of the object")
The object's IsRemovable parameter must be true.
For dwellings - RazeBuilding('script name of the dwelling')
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога
Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
I have two problems:
1) I'm doing a quest: kill a specific hero. And I'm setting the reward to 35 Imps (i.e., creatures). When I kill this hero, a message appears: quest completed. But the creatures are not given. What could be the problem? Should I provide some screenshots?
2) I can't write scripts. The editor crashes immediately. Is there any way to bypass this? Or can I do without scripts?
Thank you in advance.
Added after 2 hours and 6 minutes
And another question: when creating a quest through the map editor, in the section where you write what needs to be done (I think it's called "kind"), is there a value that allows the hero to reach a specific region?
1) AddHeroCreature ('heroname' , 15, 35)
2) Download the special program. It's called HoMM5MapScriptsEditor.
Radionich:
1) I don't know. I wouldn't recommend anything lower than 1. You can try manually through the editor. Or through scripts. ChangeHeroStat('heroname' , stat_id (numbers from 0 to 8) , 0)
2) I don't think so. It's better to try through a script.
Trigger(REGION_ENTER_AND_STOP_TRIGGER , 'trigger name' , 'function name')
function function name (heroname)
if heroname == 'heroname' (hero name) then
--now the check has triggered, identifying which hero entered the region. Write whatever you want here. If you need to complete a quest:
SetObjectiveState ('objname' , OBJECTIVE_COMPLETED)
Trigger(REGION_ENTER_AND_STOP_TRIGGER , 'trigger name' , nil)
end
end