Skip to content

Posts from Scripts

4.8 (8 ratings)
User Avatar
Auto-translated
Hello everyone, I want to create an animation on a map. For example, an Archangel and an Archdevil are standing there. First, the Archangel attacks, the Devil takes the hit, the Archangel is happy, then the Devil attacks, and so on. You get the idea. I tried to do it, but it didn't work. They just froze in one position and that's it...
PLEASE HELP.
User Avatar
Auto-translated
I recommend searching the internet for something called libhomm3.lua; it already contains all the events from Heroes of Might and Magic III.
 

К А
Стикеры GBF в Telegram
User Avatar
Auto-translated
I recommend searching the internet for something called libhomm3.lua; it already contains all the events from the third game.
Thank you for the information.
User Avatar
Auto-translated
Hello everyone, I want to create an animation on the map. For example, an Archangel and an Archdevil are standing there. First, the Archangel attacks, the Devil takes the hit, the Archangel is happy, then the Devil attacks, and so on. You get the idea. I tried to do it, but it didn't work. They just froze in one position and that's it...
Well, it's not easy to synchronize the timing. The general idea is this:
function circle()
while 1 do
sleep(?);
PlayObjectAnimation(creature name 1, "attack00", ONESHOT);
sleep(?);
PlayObjectAnimation....
..............and so on
end;
end;
startThread(circle);
 

К А
Стикеры GBF в Telegram
In reply to Ment
User Avatar
Auto-translated
Ment
Well, it's not easy to time it. The scheme is roughly like this:
function circle()
while 1 do
sleep(?);
PlayObjectAnimation(creature name 1, "attack00", ONESHOT);
sleep(?);
PlayObjectAnimation....
..............and so on
end;
end;
startThread(circle);

THANK YOU VERY MUCH, I'LL TRY IT NOW:smile11:

Added 19 hours 55 minutes ago
nope, it's not right. I need it so that when I enter the region, the animation of the battle between the archdevil and the angel begins... like in the map "Zakakt Erisha," and they still get stuck in one position. If anything, here's my Skype: andron20005, please help...
User Avatar
Auto-translated
So, open the map mentioned above and take a look at the script...
 

К А
Стикеры GBF в Telegram
In reply to KhaBeLeh
User Avatar
Auto-translated
KhaBeLeh
THANK YOU VERY MUCH, I'LL TRY IT NOW:smile11:

Added after 19 hours 55 minutes
nope, it's not right. I need it so that when I enter the region, the animation of the battle between the archdevil and the angel begins... like in the map "Zakakt Erisha," and they still get stuck in one position. If something, here's my Skype: andron20005, please help...

If they get stuck in one position, it means that the necessary animation is not defined for them. You can set it through the properties tree.
In reply to 32MeTpa
User Avatar
Auto-translated
32MeTpa
If they get stuck in one position, it means they don't have the correct animation assigned. You can set it through the properties tree.
I'll try:smile12: :smile12: :smile13: :smile13:
User Avatar
Auto-translated
Happy holidays, script writers! =)
Not entirely on topic, but still relevant.
Моды для HeroesV:
NHF 0.90 : NHF - группа в VK

Карты для HeroesV:
Путешествие , Условие крови , Рука судьбы.Часть 1: В поход , Рука судьбы.Часть 2: Отчаянье , Рука судьбы.Часть 3: Восхождение , Стойкость
Абсолютная власть , Иду на Вы! , Корона Ургаша , На задворках
Мир надо уничтожить... Чтобы создать свой...
User Avatar
Auto-translated
Oh, it's Programmer's Day! Awesome! We should code something today! :)
Dyrman, happy holidays to you too!
 

К А
Стикеры GBF в Telegram
User Avatar
Auto-translated
A new error appears in the console. It sounds like this: `
Trigger type must be a number

What could be causing this? The trigger is a standard one, REGION_ENTER_AND_STOP_TRIGGER.
Карты для Heroes of Might and Magic V
Цикл "Закадычные враги": "Особенное гостеприимство, "Супероружие", "Меж молотом и наковальней"
"Падение Шантири"

Кампания для "Кодекса Войны"
"Выбор Сагиттеля"
User Avatar
Auto-translated
I haven't seen this before. Try replacing REGION_ENTER_AND_STOP_TRIGGER with the number that corresponds to it (6).
 

К А
Стикеры GBF в Telegram
User Avatar
Auto-translated
Thank you, everything is working now :). Although it's really strange - it works fine when placed nearby, but the script with the letter equivalent of the trigger doesn't :eek:. I probably made a mistake somewhere.

Could you please provide the numerical values for all the triggers or tell me where I can find them?

----------------------------------------------------------------------------------------------------

Also, could you explain how Sleep works? I simply inserted it into a function, with MoveHeroRealTime before it and MessageBox after it (i.e., the enemy attacks first, then the battle, and then the message), and it gives me an error:
ScriptWarning: Value was NIL when getting global with name 'Sleep' 
ScriptError: Attempt to call a 'nil' value
Without sleep(5), it works, but the message is displayed before the battle. With sleep(5), it doesn't display at all :D. Am I using this sleep incorrectly?
Карты для Heroes of Might and Magic V
Цикл "Закадычные враги": "Особенное гостеприимство, "Супероружие", "Меж молотом и наковальней"
"Падение Шантири"

Кампания для "Кодекса Войны"
"Выбор Сагиттеля"
User Avatar
Auto-translated
Numerical values in the documentation (ids_for_scriptes.pdf)
Regarding "sleep," you might have written it with a capital letter; if I understand the console correctly.
 

К А
Стикеры GBF в Telegram
In reply to Ment
User Avatar
Auto-translated
Ment
Digital values in the documentation (ids_for_scriptes.pdf)
Thank you :)!
Ment
Regarding 'sleep', you might have written it with a capital letter, if I understand the console correctly.
Apparently, I missed something in my scripting learning process. I didn't even know that the editor was case-sensitive :(. Thank you, I've fixed it.
Карты для Heroes of Might and Magic V
Цикл "Закадычные враги": "Особенное гостеприимство, "Супероружие", "Меж молотом и наковальней"
"Падение Шантири"

Кампания для "Кодекса Войны"
"Выбор Сагиттеля"

Statistics

Welcome our newest member: Emil