Skip to content

Posts from Scripts

4.8 (8 ratings)
User Avatar
Auto-translated
One more time (for clarification). You started the map from the beginning. You approached the object with a hero. You clicked. The function failed. Is that correct?
That's exactly it. So, it won't work?:(
502 Bad Gateway
__________________________________
nginx/0.8.54
User Avatar
Auto-translated
I'm saddened by the fact that it's unclear why this is happening. It's clear that the issue lies with the heroname. Try rewriting the function from scratch manually. (using the heroname string from other working maps).

Whatever
User Avatar
Auto-translated
I guess I'll have to use the method I used in the console function.

Added 3 minutes later
The function doesn't work even through the console, where I manually entered the heroname.
502 Bad Gateway
__________________________________
nginx/0.8.54
User Avatar
Auto-translated
Attachments 1
1 file attached • Total size: 187.4 KB
502 Bad Gateway
__________________________________
nginx/0.8.54
User Avatar
Auto-translated
1) Nimus without an army!!! (just kidding) 2) You need to write nil instead of false there... I think. 3)*** Is it possible to launch a function like that? I didn't know. And you can make it simpler. Add if heroname == 'Christian' then to the function body. Then we'll see if it's at least calling heroname, or not even trying. (And don't forget to put end then) Stop! How are you putting the quotes?! If you press E twice (with the English keyboard layout), that's wrong, you need " (shift+2)

Whatever
In reply to Heroist
User Avatar
Auto-translated
Heroist
1) Nimus without an army!!! (just kidding)
2) You need to write nil instead of false there... I think.
3)*** Is it possible to run a function like that? I didn't know. And you can make it simpler. Add if heroname == 'Christian' then to the body of the function. Then we'll see if it even calls heroname, or doesn't even try. (And don't forget to put end then)
Stop! How are you putting the quotes?! If you press E twice (with the English layout), that's wrong, you need " (shift+2)
The problem is that on the map, the hero is chosen by the player, and it is impossible to determine the heroname of the main hero, because the player might choose any hero.
502 Bad Gateway
__________________________________
nginx/0.8.54
User Avatar
Auto-translated
Why is it impossible? If there's only one hero at the start, it's easy. Heroesplayer1 = GetPlayerHeroes(1); -- assigns the number of existing heroes to the variable hero1 = Heroesplayer1[0]; -- assigns the name of the first hero in the list to the variable -- this can continue indefinitely (until the variable runs out) and the name of the starting (and first) hero of player 1 = is now hero1

Whatever
In reply to Heroist
User Avatar
Auto-translated
The ShowFlyingSign function requires a second parameter: the name of the object from which the message will fly.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
Auto-translated
Where should I write it: after or before the message?
502 Bad Gateway
__________________________________
nginx/0.8.54
User Avatar
Auto-translated
I've already figured it out. I'll check it now.
502 Bad Gateway
__________________________________
nginx/0.8.54
User Avatar
Auto-translated
I'm still having a problem, but it's no longer with that. Here is the contents of the ehe.txt file:
+ Phoenixes
+ Fire Elementals
+ Water Elementals
+ Earth Elementals
+ Air Elementals
And this is what it displays: (:eek:)
Attachments 1
1 file attached • Total size: 107.3 KB
502 Bad Gateway
__________________________________
nginx/0.8.54
In reply to Warrior777
User Avatar
Auto-translated
If you are creating texts with undefined insertions, you need to change the way the entry is recorded in the script. Instead of w..'ehe.txt' You should use {w..'ehe.txt'; fac=fac, eac=eac}
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
ShowFlyingSign({w.."ehe.txt"; fac=fac, eac=eac},"eh1");
Вот так?
502 Bad Gateway
__________________________________
nginx/0.8.54
In reply to Warrior777
User Avatar
Auto-translated
Yes, that’s right. By the way, the object from which the message will appear can be the hero himself.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4

Statistics

Welcome our newest member: Emil