Skip to content

Posts from Scripts

4.8 (8 ratings)
In reply to RedHeavenHero
User Avatar
#636
Auto-translated
That's not what I meant. Example: Lich Week. The spawn rate of liches, archliches, and greater liches is doubled. However, these creatures still spawn on the map. How can I prevent them from spawning?
Мои карты:
Town
Готовится:Чума (40%), Сосиска(42%), Война Грааля
In reply to Олегарх
User Avatar
#637
Auto-translated
That's not what I meant.
Example: Lich Week. The spawn rate of liches, archliches, and greater liches is doubled.
At the same time, the aforementioned creatures spawn on the map. How can I prevent them from spawning?

Then it's better to disable monster weeks in the map tree (set the value to true for MoonCalendarModifications\BlockMonstersWeeks).
User Avatar
#638
Auto-translated
Is it possible to transfer a town to a neutral player? And can you remove a hero from the map if they are already on it?
Карты для Heroes of Might and Magic V
Цикл "Закадычные враги": "Особенное гостеприимство, "Супероружие", "Меж молотом и наковальней"
"Падение Шантири"

Кампания для "Кодекса Войны"
"Выбор Сагиттеля"
User Avatar
#639
Auto-translated
Yes, it is possible (see "The Tale of Igor's Campaign").
Certainly (see "The Tale of Igor's Campaign").
 

К А
Стикеры GBF в Telegram
User Avatar
#640
Auto-translated
I looked it up, and found this for a neutral town:
SetObjectOwner('Town',0);
It's strange, my editor gave an error for PLAYER_0... However, I couldn't find anything for a hero. I noticed the function IsHeroAlive. How can I make it so that if IsHeroAlive('Eruina') is true, the heroine will die?
Карты для Heroes of Might and Magic V
Цикл "Закадычные враги": "Особенное гостеприимство, "Супероружие", "Меж молотом и наковальней"
"Падение Шантири"

Кампания для "Кодекса Войны"
"Выбор Сагиттеля"
User Avatar
#641
RemoveObject просто.
 

К А
Стикеры GBF в Telegram
User Avatar
#642
Auto-translated
How do you create such scripts:
1. So that when entering peasant huts, a message appears (like in the first mission for Gothia).
2. So that the player can clear debris blocking resources, preferably only for the human player, and the AI cannot do this (like in mission 4 for Aranthir).
Беспорядок рождается из порядка, трусость рождается из храбрости, слабость рождается из силы.
In reply to Кировчанин
User Avatar
#643
Auto-translated
Resident of Kirov
How do you create such scripts:
1. So that when entering peasant dwellings, a message appears (like in the first mission for Gothia).
2. So that the player can clear debris for resources, preferably only for the human player, and the AI cannot do this (like in mission 4 for Arantir).
1. Use the MessageBox command.
2. What do you mean by "debris"?
Мои карты:
Town
Готовится:Чума (40%), Сосиска(42%), Война Грааля
User Avatar
#644
Auto-translated
I need help with this script snippet... it doesn't work :( The console is silent, both at the beginning of the map and during the walkthrough... it just doesn't work. No reaction at all... here's the script:
function dopF()
prog = 1
MessageBox(GetMapDataPath().."text10.txt");
Trigger(REGION_ENTER_AND_STOP_TRIGGER, "wayF", nil);
sleep(5)
SetObjectiveState('obj_dop', OBJECTIVE_ACTIVE);
SetObjectiveVisible('obj_dop', true, PLAYER_1);
Trigger(REGION_ENTER_AND_STOP_TRIGGER, "wayF", "dopF");
end;

function dop1()
if prog == 1 then
MessageBox(GetMapDataPath().."text11.txt");

elseif prog == 2 then
SetObjectiveState("obj_dop", OBJECTIVE_COMPLETED);
Trigger(REGION_ENTER_AND_STOP_TRIGGER, "way1", nil);
AddHeroCreatures("hero", 64, 30);
end;
Trigger(REGION_ENTER_AND_STOP_TRIGGER, "way1", "dop1");

function fenixF()
prog = prog + 1
Trigger(OBJECT_TOUCH_TRIGGER, "fenix", nil);
Trigger(OBJECT_TOUCH_TRIGGER, "fenix", "fenixF");
end;
end;
Создаётся карта "Забытый Авангард (готовность 80%)
User Avatar
#645
Auto-translated
At the very least, a semicolon is missing after:
prog = 1
sleep (5)
prog = prog +1
Also, something seems strange with the "end" statements. After the dop1 function, there isn't one, but after fenixF, there are two.
 

К А
Стикеры GBF в Telegram
User Avatar
#646
Auto-translated
I think the console would flag the issue with the missing semicolons... I'll add them now.
Создаётся карта "Забытый Авангард (готовность 80%)
User Avatar
#647
Auto-translated
No, she looked and saw that the number matched, and she ignored the fact that they weren't in the right place. Unless you need some special script where the body of one function is contained within the body of another...
 

К А
Стикеры GBF в Telegram
User Avatar
#648
Auto-translated
Unfortunately, it doesn't work. I also rearranged the `end` statements and added semicolons... but the console is still silent... I really don't understand.

Added 1 minute ago
I experimented with the placement of the functions... but it didn't help.
Создаётся карта "Забытый Авангард (готовность 80%)
User Avatar
#649
Auto-translated
And what is the point of this:
Trigger(OBJECT_TOUCH_TRIGGER, "fenix", nil );
Trigger(OBJECT_TOUCH_TRIGGER, "fenix", "fenixF" );
First, you reset the trigger, and then immediately activate it? Why?
 

К А
Стикеры GBF в Telegram
User Avatar
#650
Auto-translated
I need to reset the trigger only after the desired value of the "prog" variable equals two... is this really so difficult, and is there no way to reset it like that?
Создаётся карта "Забытый Авангард (готовность 80%)

Statistics

Welcome our newest member: Emil