Skip to content

Posts from Scripts

4.8 (8 ratings)
Auto-translated
for some reason, it doesn't work.
In reply to JORAJAN
User Avatar
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 RedHeavenHero
Auto-translated
at the beginning, I didn't have enough brains
found a bug, thanks, I'll keep experimenting.
In reply to RedHeavenHero
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
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
User Avatar
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
User Avatar
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
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: Emil