Skip to content

Posts from Scripts

4.8 (8 ratings)
#1063
Auto-translated
for some reason, it doesn't work.
In reply to JORAJAN
User Avatar
#1064
Auto-translated
Write down the error from the console. It is displayed in red/orange.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
In reply to JORAJAN
User Avatar
#1066
Auto-translated
This is not the console. The console looks like this: It appears when you press the "Ё" key, if it's activated, of course. How to activate the console
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
In reply to JORAJAN
User Avatar
#1068
Auto-translated
Also at the very beginning of the game?
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
In reply to RedHeavenHero
#1069
Auto-translated
at the beginning, I didn't have enough brains
found a bug, thanks, I'll keep experimenting.
In reply to JORAJAN
User Avatar
#1070
Auto-translated
In the nineteenth line, after `while i`, there is `=`, but it should be `==`.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
In reply to RedHeavenHero
#1071
Auto-translated
I already removed that; I thought you had added it unnecessarily, but I found the error.
It was my mistake; I didn't sign one of the gates.
I thought it wouldn't cause an error.
In reply to JORAJAN
#1072
Auto-translated
Another question -
is it possible to make this script
garrisons={'G1', 'G2', 'G3', 'G4', 'G5', 'G6', 'G7', 'G8', 'G9'}
for j, gar in garrisons do
Trigger(5, gar, 'capture_gar')
garrisons[gar] = {}
for i = 0, 6 do
local t, n = GetObjectArmySlotCreature(gar, i)
garrisons[gar]= {t, n}
end
end

function capture_gar(oldowner, newowner, hero, gar)
for i = 0, 6 do
if garrisons[gar][1] ~= 0 then
AddObjectCreatures(gar, garrisons[gar][1], garrisons[gar][2]*2)
end
end
DenyGarrisonCreaturesTakeAway(gar, 1)
Trigger(5, gar, nil)
end
work infinitely?
because one time is not enough for me
In reply to JORAJAN
User Avatar
#1073
Auto-translated
Remove the second to last line: Trigger(5, gar, nil).
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
#1074
Auto-translated
Who can help complete a function that works for any hero? Example: function FFFFFF (heroname) lalalala... it doesn't matter in general. SetObjectPosition (heroname, 110, 45, 0, 0) -- produces a strange script error. However, GetObjectPosition heroname seems to work. How can I do it correctly?

Whatever
In reply to Heroist
User Avatar
#1075
Auto-translated
Everything is important here: both the "lalala" and, especially, the strange errors. ;)
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
#1076
Auto-translated
Here. In the second screenshot, at the end, there are a couple more endow commands, but that's not the issue. In the first screenshot, the error is on line 295, and in the second screenshot, that line is the first line above SetObjectPosition.
Attachments 2
2 files attached • Total size: 19.8 KB

Whatever
In reply to Heroist
User Avatar
#1077
Auto-translated
Generally, it's not recommended to write one function inside another. But if it's absolutely necessary, you should put a '%' sign before 'heroname'.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

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

Statistics

Welcome our newest member: wayal