Skip to content

Posts from Scripts

4.8 (8 ratings)
In reply to Dyrman
#275
Auto-translated
Dyrman

You use an empty, reserved slot for a global spell, and when you call it, you launch a message with variables - it's all very simple ;) For displaying loyalty, by the way ;) If you need the code, I'll post it upon request.
yeah, that's a stage we've already passed, polished to a shine long ago :cool:

Added 2 minutes ago
Dyrman

I'm conservative when it comes to changing the game.
well, well, and in your case, you can hire Phoenixes in the Conflux - isn't that a departure from conservatism?

Added 2 minutes ago
you can't fix the interface with scripts - it doesn't support icons, words, or variables. Oh well!
I experimented with the creature interface, not the hero's - but it's the same.
In reply to JonnyP
User Avatar
#276
Auto-translated
JonnyP
and when activating the quest, you need to assign
atonce_5=1; and after completing the quest, atonce_5=99; so that the cycle doesn't slow down the game.
As I understand it, 'anonce_5' is a variable. But why set it to 99 :eek:? Why not 2 or 0?

And I'll try with the quest – I'll create a new one, since this one refuses to work correctly.

Thanks for the help, I'll try changing something, probably :).
Dyrman
According to the game's design, he will lose anyway.
But it's an enemy player :).
And what prevents you from attaching it to a trigger for a new day?
I'm not very good with scripts; I don't know how it's written or how it's used :o.
Карты для Heroes of Might and Magic V
Цикл "Закадычные враги": "Особенное гостеприимство, "Супероружие", "Меж молотом и наковальней"
"Падение Шантири"

Кампания для "Кодекса Войны"
"Выбор Сагиттеля"
In reply to Победитель
#277
Auto-translated
Winner
As I understand it, 'anonce_5' is a variable. But why set it to 99? Why not 2 or 0?
Yes, it's a variable. The value can be anything. I just gave an example from my own map, and 99 is just for convenience – I use it to indicate that the quest is completed.
Trigger for a new day:
Trigger (NEW_DAY_TRIGGER,'your_function');
function your_function()
..... (you can put a check for player defeat here)
end;
In reply to JonnyP
User Avatar
#278
Auto-translated
JonnyP
yeah, that's a thing of the past, polished to perfection long ago :cool:

Added 2 minutes ago

well, you can hire Phoenixes in your maps in the Conflux - isn't that a departure from conservatism?

Added 2 minutes ago
the interface can't be fixed with scripts - it doesn't support icons, words, or variables. How about that!
I experimented with the creature interface, not the hero interface - but it's the same.
Glad to hear you've studied or played it too :)
Regarding the Phoenixes, they are hired not in the Conflux, but as copies of the Conflux, which doesn't affect other maps as a mod would ;) The Phoenixes were introduced by the developers, and I don't see anything "anti-conservative" about hiring them.
It's clear that the interface can't be fixed, but how do you pass variables? This isn't about fixing the interface, but about calling data from the existing interface.
Моды для HeroesV:
NHF 0.90 : NHF - группа в VK

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

The interface is clearly beyond repair, but how do you pass variables? This isn't about fixing the interface, but about calling data from an existing interface.
Can you explain it properly?
In reply to JonnyP
User Avatar
#280
Auto-translated
JonnyP
Can you explain it properly?
I was watching the meeting. For example, couldn't you implement an intercept when clicking on the hero icon on the global map? You click on the hero, a window pops up, and a message with variables appears on top of or behind it... This relates to one of the cases...
Моды для HeroesV:
NHF 0.90 : NHF - группа в VK

Карты для HeroesV:
Путешествие , Условие крови , Рука судьбы.Часть 1: В поход , Рука судьбы.Часть 2: Отчаянье , Рука судьбы.Часть 3: Восхождение , Стойкость
Абсолютная власть , Иду на Вы! , Корона Ургаша , На задворках
Мир надо уничтожить... Чтобы создать свой...
In reply to Dyrman
User Avatar
#281
Auto-translated
I have a question: let's say there are two regions. Is there a script that would make the second region trigger only after the player has visited the first?
#282
Auto-translated
It can definitely be done using the if... then... command. I think it's possible to make it so that a specific monster B1 (a weak stack of 1 unit) is located in sector a1, then:
function Second()
if command_to_check_for_object_existence(B1) then
commands_of_the_second_function
end;
end;
Region trigger.
Maybe I'm wrong, but it seems to me to be the most advantageous option.
Мои карты:
SinglePlayer: Выбор Зехира
Падение Стедвика(pre-release)
Готовится: Зима Титанов, Столетняя война
User Avatar
#283
Auto-translated
No, that works, but it would be much simpler to place the function that triggers the second trigger within the body of the first trigger.
 

К А
Стикеры GBF в Telegram
In reply to Ment
User Avatar
#284
Auto-translated
I need to make the second region accessible only if the first region has been visited. How do I write this "if" statement?
In reply to Олегарх
User Avatar
#285
Auto-translated
Oligarch
I need to make the second region active only if the first region has been visited. How do I write this "if" statement?
Introduce a variable:

flag=0;

F1start
flag=1;
F1end

trigger1onF1

if flag==1 then
trigger2onF2
end;
Моды для HeroesV:
NHF 0.90 : NHF - группа в VK

Карты для HeroesV:
Путешествие , Условие крови , Рука судьбы.Часть 1: В поход , Рука судьбы.Часть 2: Отчаянье , Рука судьбы.Часть 3: Восхождение , Стойкость
Абсолютная власть , Иду на Вы! , Корона Ургаша , На задворках
Мир надо уничтожить... Чтобы создать свой...
In reply to Dyrman
User Avatar
#286
Auto-translated
And regarding the double equals sign – should it be placed everywhere, or only in specific locations?
User Avatar
#287
Auto-translated
A single equals sign means assigning a specific value to a variable, while a double equals sign is used for equality checks, typically following an `if` statement.
 

К А
Стикеры GBF в Telegram
In reply to Ment
User Avatar
#288
Auto-translated
Ment
A single equals sign means assigning a specific value to a variable, while a double equals sign is used for equality checks, usually placed after an if statement.
Thank you. Another question arose: how can I ensure that scripts are executed in a specific sequence, i.e., for example:
function mesF()
MessageBox...
StartCombat...
MessageBox...
Trigger...
end;
Trigger...
first message, then combat, and then the second message? Because right now, the first message pops up, then the second, and only then does the battle begin.
In reply to Олегарх
User Avatar
#289
Auto-translated
Oligarch
Thank you. Another question arose: how can I make scripts execute only in a specific sequence, i.e., for example:
function mesF()
MessageBox...
StartCombat...
MessageBox...
Trigger...
end;
Trigger...
first message, then combat, and then the second message? Otherwise, the first message pops up, then the second, and then the battle.
function mesF()
MessageBox...
StartCombat...
sleep(20) - we add a time delay so that the battle doesn't pop up later
MessageBox...
Trigger...
end;
Trigger...
Моды для HeroesV:
NHF 0.90 : NHF - группа в VK

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

Statistics

Welcome our newest member: Emil

Users Online 3 users 1341 guests