Skip to content

Posts from Scripts

4.8 (8 ratings)
Auto-translated
Oh, here's what I was looking for. I had the same problem. Thanks for the tip!
Best regards.
Мои карты:
SinglePlayer: Выбор Зехира
Падение Стедвика(pre-release)
Готовится: Зима Титанов, Столетняя война
User Avatar
Auto-translated
1. Which team is responsible for implementing the check to determine which faction a player is playing as? (For example: If player_1 is playing as Inferno, then...).
2. Also, how do you transfer ownership of a building to another player (e.g., a lumber mill)?
Auto-translated
2 - SetObjectOwner(script_name_of_object, player_ID)
Sincerely.
Мои карты:
SinglePlayer: Выбор Зехира
Падение Стедвика(pre-release)
Готовится: Зима Титанов, Столетняя война
In reply to djulian13
User Avatar
Auto-translated
Is there a script that allows you to create a specific object on the map when a certain region is visited?
User Avatar
Auto-translated
I don’t think so. And why would we?
 

К А
Стикеры GBF в Telegram
In reply to Ment
User Avatar
Auto-translated
Ment
I don't think so. And why would it?
Well, for example, a hero enters a region, and they are told: bring an artifact. And this artifact appears somewhere on the map.
Auto-translated
Maybe create a hero in reserve, and assign this art to him? Then, when issuing a task, give the command to make this hero appear on the map. _____ And I have this problem. My script persistently refuses to execute the StartThread function.
Console
[Script warning!] Value was NIL when getting global with name 'StartThread'
(Script)ERROR: attempt to call a nil value
Function
function Call_of_Urgash()
if HasHeroSkill('Oddrema', 98) then
MessageBox(GetMapDataPath().. 'Call.txt')
ChangeHeroStat('Oddrema', STAT_EXPERIENCE,43119)
AddObjectCreatures('Oddrema', 27, 18)
SetObjectiveState('SA', PLAYER_1, 3)
flag = 1
end;
end;
StartThread('Call_of_Urgash');
What's the problem? Sincerely.
Мои карты:
SinglePlayer: Выбор Зехира
Падение Стедвика(pre-release)
Готовится: Зима Титанов, Столетняя война
In reply to djulian13
User Avatar
Auto-translated
Is there a command to move an object? So that, for example, you can place an artifact somewhere further away, and then it moves to the desired location.
In reply to djulian13
User Avatar
Auto-translated
djulian13

_____
I have the following problem. My script stubbornly refuses to execute the StartThread function.

What's the problem?
Sincerely.
When using startThread in a function definition, you don't need enclosing quotation marks or apostrophes.
startThread(Call_of_Urgash);

Added 4 minutes later
Oligarch
Is there a command to move an object? So that, for example, you can place an artifact somewhere further away, and then it moves to the desired location.
SetObjectPosition(Object Name, tile coordinate X, tile coordinate Y, underground level or surface)
Everything is available online, in the search on this forum, and in the documentation. You also need to remember to set one property of the object to true, if possible.

Added 2 hours 50 minutes later
Example:
SetObjectPosition("Name", 23, 45, 0)
Моды для HeroesV:
NHF 0.90 : NHF - группа в VK

Карты для HeroesV:
Путешествие , Условие крови , Рука судьбы.Часть 1: В поход , Рука судьбы.Часть 2: Отчаянье , Рука судьбы.Часть 3: Восхождение , Стойкость
Абсолютная власть , Иду на Вы! , Корона Ургаша , На задворках
Мир надо уничтожить... Чтобы создать свой...
Auto-translated
Thank you very much!
By the way, it finally dawned on me. The message box text was also in ANSI. I'll go fix it.
Sincerely.

Added 1 hour 50 minutes ago
No, it still doesn't work. It gives the same error.
Sincerely.
Мои карты:
SinglePlayer: Выбор Зехира
Падение Стедвика(pre-release)
Готовится: Зима Титанов, Столетняя война
In reply to djulian13
User Avatar
Auto-translated
djulian13
Thank you very much!
By the way, it finally dawned on me. There was also text in the message box in ANSI. I'll go fix it.
Sincerely.

Added 1 hour 50 minutes ago
No, it still doesn't work. It gives the same error.
Sincerely.
And with a lowercase letter?
startThread
Моды для HeroesV:
NHF 0.90 : NHF - группа в VK

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

Added 2 hours and 5 minutes ago
The console is completely silent, as is the script editor. I've re-encoded the text. No luck. I suspect the problem is that my game simply doesn't recognize the "HasHeroSkill" command in the same way it did with "AddHeroCreatures." Best regards.
Мои карты:
SinglePlayer: Выбор Зехира
Падение Стедвика(pre-release)
Готовится: Зима Титанов, Столетняя война
In reply to djulian13
User Avatar
Auto-translated
djulian13
Thank you, I'll try it now.
Best regards.

Added 2 hours and 5 minutes ago
The console is completely silent, and the script editor is too. I re-encoded the text. No use. I suspect the problem is that my game simply doesn't recognize the "HasHeroSkill" command in the same way it did with "AddHeroCreatures".
Best regards.
So, the condition is not being met, or it is specified incorrectly (since there are no errors).

Could you outline the algorithm: what needs to be done and why, step by step?
From beginning to end, one act.
Моды для HeroesV:
NHF 0.90 : NHF - группа в VK

Карты для HeroesV:
Путешествие , Условие крови , Рука судьбы.Часть 1: В поход , Рука судьбы.Часть 2: Отчаянье , Рука судьбы.Часть 3: Восхождение , Стойкость
Абсолютная власть , Иду на Вы! , Корона Ургаша , На задворках
Мир надо уничтожить... Чтобы создать свой...
Auto-translated
There is a goal to obtain "Urgash's Call" with the OBJECTIVE_KIND_MANUAL parameter, and the script name is SA. It should be implemented so that as soon as the player receives the "Urgash's Call" ability, the aforementioned script is activated – granting the player experience up to level 26, completing this very task, and setting the "flag" variable to "1".
Sincerely.
Мои карты:
SinglePlayer: Выбор Зехира
Падение Стедвика(pre-release)
Готовится: Зима Титанов, Столетняя война
In reply to djulian13
User Avatar
Auto-translated
djulian13
There is a goal to obtain "Call of Urgash" with the OBJECTIVE_KIND_MANUAL parameter, script name - SA. It should be implemented so that as soon as the player receives the "Call of Urgash" ability, the aforementioned script is activated - giving the player experience up to level 26, completing this very task, and setting the "flag" variable to "1".
Best regards.
I'm at work right now. I don't have the documentation at hand (so I can't write the scripts right away). But in general, the check for obtaining "Call of Urgash" is usually attached to the hero's level-up trigger.
Моды для HeroesV:
NHF 0.90 : NHF - группа в VK

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

Statistics

Welcome our newest member: Emil