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 ofan 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 makesure that the path of the shared property leads to
the copy.
Сообщения от Текущие вопросы и ответы по редактору карт
Добавлено через 1 минуту
Руководство тоже читал, ладно завтра прочитаю ещё может додумаюсь.
Скрипты:
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;Варнинги:
Написал скрипт, тред который проверяет посещены ли определенные хранители ключей и в зависимости от условий выдаёт сообщение. Он работает так как мне надо, но почему-то полностью засирает консоль варнингами. Помогите разобраться, что не так.
Скрипты:Варнинги:
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;
В итоге, если уберутся все обращения к пустым глобальным переменным (со значением nil), то уйдут и предупреждения.
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога
Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
Странновато тут конечно с построением кода.
Проблема в HasBorderguardKey(PLAYER_1, RED_KEY). Если обращаться по названию то функция возвращает nil, если ключник не посещен, когда посещен - всё нормально. Когда я заменил имя на номер( HasBorderguardKey(PLAYER_1, 1) ), вкупе с остальными рекомендациями - оповещения пропали.
Так же заметил, что при выполнении условий задания (убийстве враж. героя) задание само не выполняется, а остаётся висеть. Вот настройки этого задания.
isInitialyActive поставить false и ShowCompleted тоже, чтобы убиралось после выполнения
Теперь вместо названия и описания задания пустые поля, и всё равно не засчитывает выполнение.
Я вот думаю, мб дело в скрипте? Я там юзал команду SetObjectiveVisible. Мб стоит изменить на GetObjectiveState, что это изменит?