Skip to content

Posts from Current questions and answers regarding the map editor. Auto-translated

5.0 (12 ratings)
In reply to Ment
User Avatar
#1713
Auto-translated
Dear Ment, could you briefly describe the entire procedure? If it's not too much trouble. If I don't understand it right away, I'll just insert the mod that adds all the dwellings to the map into the map for now. I really want to understand it myself. Damn, it doesn't seem to be working.
User Avatar
#1714
Auto-translated
1) Is it possible to "deactivate" a trigger? I.e., to make it functional again within some function. 2) Is it possible to implement the following: when a trigger is activated, one function is called, but after a certain time (e.g., 2 weeks), another function is called?
User Avatar
#1715
Auto-translated
1) Is it possible to "re-enable" a trigger? I.e., make it functional again within some function.
Of course. You do the same thing as you did during the initial activation. For example, Trigger(blah-blah-blah, function name).
2) Is it possible to implement the following: when a trigger is used, one function is called, but after some time (e.g., 2 weeks), another function is called?
Set the trigger for a new day and see when the two weeks expire. After this time, you need to run the Trigger function again, but set the link in it to a different function.
 

К А
Стикеры GBF в Telegram
User Avatar
#1716
Auto-translated
1) Thank you. 2) This can be easily done with the same success by simply writing a function into a trigger for a new day... but it requires 2 weeks relative to the trigger on the object, i.e., I don't know exactly when those 2 weeks will expire. They could pass on day 14, or on day 140 - depending on when that trigger is activated...
User Avatar
#1717
Auto-translated
The GetDate function has several parameters: day of the week, week of the month, and month. All three must match a specific value.
 

К А
Стикеры GBF в Telegram
In reply to Ment
User Avatar
#1718
Auto-translated
Ment

Set a trigger for a new day and see when two weeks have passed. After this period, you need to run the Trigger function again, but set a different link to a function within it.
It's that simple; just set a condition before the trigger:
If AbsoluteDay < 20 days, then trigger!
If 90 < AbsoluteDay < 120, then...
Instead of numbers, you can also use variables. And use complex conditions with AND/OR.

Added 2 minutes later
Ment
The GetDate function has several parameters: day of the week, week of the month, and month. All three need to match a specific value.
AbsoluteDay is sufficient.

Here's a simple example:
flagDate=0;
flagX=0;
--flagX is a flag for another event, and if it needs to be used, it is indicated in flagX=1;

function FGrobnica()
if flagDate==0 then
flagDate=GetDate(ABSOLUTE_DAY)+14;
end;
if GetDate(ABSOLUTE_DAY)<=flagDate then
--CONDITION1
end;
if flagX==1 then
--CONDITION2
end;
end;

Trigger(OBJECT_TOUCH_TRIGGER, "Grobnica","FGrobnica");
Моды для HeroesV:
NHF 0.90 : NHF - группа в VK

Карты для HeroesV:
Путешествие , Условие крови , Рука судьбы.Часть 1: В поход , Рука судьбы.Часть 2: Отчаянье , Рука судьбы.Часть 3: Восхождение , Стойкость
Абсолютная власть , Иду на Вы! , Корона Ургаша , На задворках
Мир надо уничтожить... Чтобы создать свой...
User Avatar
#1719
Auto-translated
Dyrman
If it's difficult to write it yourself, write here everything you need, down to the specifics, and I'll write the script.
I won't refuse if you provide more details.
No need for specific details... Here's what I need: There's a Trigger(OBJECT_TOUCH_TRIGGER, ...). I need something to happen (e.g., a message is displayed) 2 weeks after this trigger is activated.

And another question: can I place the Tear of Ashi on the map as an artifact? I mean, not buried, but like all the other artifacts.
In reply to 32MeTpa
User Avatar
#1720
Auto-translated
32MeTpa
I wouldn't mind if you provided more details.
No need for specific details... Here's what I need: There's a Trigger(OBJECT_TOUCH_TRIGGER, ...). I need something to happen (e.g., a message is displayed) 2 weeks after this trigger is activated.
Ah, if it's that simple, here's the code:
flagDate=0;

function Func()
if flagDate==0 then
flagDate=GetDate(ABSOLUTE_DAY)+14;
end;
end;

Trigger(OBJECT_TOUCH_TRIGGER, "Object","Func");

function FND()
if flagDate==GetDate(ABSOLUTE_DAY) then
MessageBox(GetMapDataPath().."Text.txt");
end;
end;

Trigger(NEW_DAY_TRIGGER, "FND");
Моды для HeroesV:
NHF 0.90 : NHF - группа в VK

Карты для HeroesV:
Путешествие , Условие крови , Рука судьбы.Часть 1: В поход , Рука судьбы.Часть 2: Отчаянье , Рука судьбы.Часть 3: Восхождение , Стойкость
Абсолютная власть , Иду на Вы! , Корона Ургаша , На задворках
Мир надо уничтожить... Чтобы создать свой...
User Avatar
#1721
Auto-translated
What is flagDate?
In reply to 32MeTpa
User Avatar
#1722
Auto-translated
32MeTpa
What is flagDate?
It's a regular variable that I introduced to determine when the conditions should trigger.
Моды для HeroesV:
NHF 0.90 : NHF - группа в VK

Карты для HeroesV:
Путешествие , Условие крови , Рука судьбы.Часть 1: В поход , Рука судьбы.Часть 2: Отчаянье , Рука судьбы.Часть 3: Восхождение , Стойкость
Абсолютная власть , Иду на Вы! , Корона Ургаша , На задворках
Мир надо уничтожить... Чтобы создать свой...
User Avatar
#1723
Auto-translated
Thank you! Now I understand everything...
And regarding
And another question: is it possible to place Ashera's Tear on the map as an artifact? I mean, not buried, but like all the other artifacts.
do you happen to know?)
In reply to 32MeTpa
User Avatar
#1724
Auto-translated
32MeTpa
Thank you! Now I understand everything...
And by the way, do you happen to know anything about it?
I haven't delved into these intricacies, although it's quite possible that you need to replace any ordinary art with a tear, but with a modified position relative to the hero (for example, move it from the backpack to the pocket). Or even not change it at all. However, there's no guarantee that it will work. But that would be a mod.
Although, it's possible that the Ash object lacks active tiles, and they need to be added...
Моды для HeroesV:
NHF 0.90 : NHF - группа в VK

Карты для HeroesV:
Путешествие , Условие крови , Рука судьбы.Часть 1: В поход , Рука судьбы.Часть 2: Отчаянье , Рука судьбы.Часть 3: Восхождение , Стойкость
Абсолютная власть , Иду на Вы! , Корона Ургаша , На задворках
Мир надо уничтожить... Чтобы создать свой...
User Avatar
#1725
Auto-translated
You can create a script: the hero enters a cell with a Tear and receives it.
Карты для Heroes of Might and Magic V
Цикл "Закадычные враги": "Особенное гостеприимство, "Супероружие", "Меж молотом и наковальней"
"Падение Шантири"

Кампания для "Кодекса Войны"
"Выбор Сагиттеля"
User Avatar
#1726
Auto-translated
Or you can give a tear to some neutral creature in its "inventory".
Although, it's possible that the artifact lacks active tiles, so they need to be added...
That's quite possible. The tear indeed doesn't have any active tiles, but I assume it also lacks a visual model.
 

К А
Стикеры GBF в Telegram
In reply to Ment
User Avatar
#1727
Auto-translated
Ment

That's quite possible. The Tear doesn't actually have any active tiles, but I don't think it has a visual model either.
Well, you could just add some kind of unusual object.
Моды для HeroesV:
NHF 0.90 : NHF - группа в VK

Карты для HeroesV:
Путешествие , Условие крови , Рука судьбы.Часть 1: В поход , Рука судьбы.Часть 2: Отчаянье , Рука судьбы.Часть 3: Восхождение , Стойкость
Абсолютная власть , Иду на Вы! , Корона Ургаша , На задворках
Мир надо уничтожить... Чтобы создать свой...