RazeTown
RazeTown – raze a town on the map
Syntax
RazeTown(townName);
Description
Removes the specified town from the map and replaces it with a static object – razed town. The ‘razed town’ object is determined by the razedfield in AdvMapTownShared. If this field is empty, the town can’t be razed. The set of blocking tiles of the razed town must be the same as those of the original one’s. The razed town, as any other static object, must have no interactive tiles.
townName – town name
Warning!
The modifications made in the "Shared" properties of an object will affect all the objects of that kind in the game.
If you want your modification to be effective only on a specific map, follow these steps:
1) Place on the map the desired object.
2) Go to the Shared field of that object.
3) In the Objects list, create a new folder (Right click - New Folder) with the name of your map.
4) Place in this folder a copy of the object you want to modify.
5) Make the desired modifications to the copy.
For the modifications to be in effect, make sure that the path of the shared property leads to the copy.
Posts from Current questions and answers regarding the map editor.
Auto-translated
Added 1 minute ago
I also read the manual; I'll read it again tomorrow, maybe I'll come up with something.
I wrote a script, a thread that checks if certain key guardians have been visited and, depending on the conditions, displays a message. It works the way I need it to, but for some reason, it completely clutters the console with warnings. Help me figure out what's wrong.
Scripts:Warnings:
function StartKeyMasterObserv()
Trigger(NEW_DAY_TRIGGER, "StartKeyMasterObserv", nil );
print("Start keymaster observe thread");
startThread(CheckKeyMasterFoundThread);
end;
function CheckKeyMasterFoundThread()
GreenKeymasterMessageNotShow = true;
RedKeymasterMessageNotShow = true;
TanKeymasterMessageNotShow = true;
repeat
if HasBorderguardKey(PLAYER_1, GREEN_KEY) and GreenKeymasterMessageNotShow then
GreenKeymasterMessageNotShow = false;
MessageBox(GetMapDataPath().."KeymasterMessage/Green.txt");
end;
if HasBorderguardKey(PLAYER_1, RED_KEY) and RedKeymasterMessageNotShow then
RedKeymasterMessageNotShow = false;
MessageBox(GetMapDataPath().."KeymasterMessage/Red.txt");
end;
if HasBorderguardKey(PLAYER_1, TAN_KEY) and TanKeymasterMessageNotShow then
TanKeymasterMessageNotShow = false;
MessageBox(GetMapDataPath().."KeymasterMessage/Tan.txt");
end;
sleep(5);
until(HasAllKeymasterFound())
end;
function HasAllKeymasterFound()
if HasBorderguardKey(PLAYER_1, GREEN_KEY) and HasBorderguardKey(PLAYER_1, RED_KEY) and HasBorderguardKey(PLAYER_1, TAN_KEY) then
MessageBox(GetMapDataPath().."KeymasterMessage/All.txt");
print("Keymaster thread finish");
return true;
end;
return false;
end;
As a result, if all references to empty global variables (with a value of nil) are removed, the warnings will also disappear.
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога
Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
Also, I noticed that when the quest conditions are met (e.g., killing an enemy hero), the quest doesn't automatically complete; it remains in the list. Here are the settings for this quest.
Set isInitialyActive to false and ShowCompleted to false as well, so that it disappears after completion.
Now, instead of the task name and description, the fields are empty, and it still doesn't register the completion.
I'm wondering if the issue is with the script? I used the SetObjectiveVisible command there. Maybe I should change it to GetObjectiveState; would that make a difference?