Skip to content

Posts from Scripts Auto-translated

4.8 (8 ratings)
In reply to 32MeTpa
#2576
Auto-translated
I doubt it, but it’s worth a try.
User Avatar
#2577
Auto-translated
Godric's Hollow; it needs to be placed after each completed line)
and essentially, you can add print(""); to the function to make sure it's actually being called by the script.
Карты для Heroes V: Повелители орды:
Multiplayer: Господство, Извечное противостояние, Война за Магию, Торговая империя, Анатомия войны, Эксперимент
SingleScenario: Последний Рубеж, Трон, Элиралис, Вернуться домой!, Лабиринты разума
Campaign: Колонизация
User Avatar
#2578
Auto-translated
; you need to put it after each completed line)
Not required.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
In reply to Jack_of_shadows
User Avatar
#2579
Auto-translated
Jack_of_shadows
KioM, I suspect that all these transfers of static objects in the fifth game were implemented rather carelessly. For example, I had a case where a campfire within one level could be moved normally, but if I tried to move it from the underground to the surface, strange bugs started to occur. Considering that the bridge affects the surface geometry, Nival might not have implemented the change in geometry when transferring it and creating it using CreateStatic(). Perhaps, even when the bridge is moved, there is still a possibility to walk through the place where it was originally?

Maybe there is a way to make the hero pass through the created bridge using a script? To force it, so to speak.
Карты для Heroes V: Повелители орды:
Multiplayer: Господство, Извечное противостояние, Война за Магию, Торговая империя, Анатомия войны, Эксперимент
SingleScenario: Последний Рубеж, Трон, Элиралис, Вернуться домой!, Лабиринты разума
Campaign: Колонизация
User Avatar
#2580
Auto-translated
Well, maybe with some workarounds. Like, take a static object, a hero for example, and play an animation...
The heroes themselves seem to be automatically positioned according to their z-coordinate, so they might end up intersecting with the background. If it even works at all.
 

К А
Стикеры GBF в Telegram
User Avatar
#2581
Auto-translated
If the bridge is impassable, the game should still prevent the player from simply sending their unit to the other side; it should be considered inaccessible. You would have to force the player to approach the bridge and somehow initiate the crossing (e.g., using a teleport function with no animation, so it instantly teleports – a common game convention). Alternatively, you could create a shallow river with a ford in that location, place a region there, and block it for the player, then unlock it after the bridge is built.
In reply to Jack_of_shadows
#2582
Auto-translated
How do I make cells inactive so that units cannot move onto them? In my case, these are various types of walls.
User Avatar
#2583
Auto-translated
What is the correct way to write the command that changes the type of a creature recruitment building on the map (the ones that increase growth)? I need to change all 4 Dwarf buildings, including the outpost, to equivalent Necropolis buildings.
Карты для героев 5

"Плата за любовь"
"Путь некроманта"
"Темные грани"
"Рок Гримхейма"
In reply to AstralLein
User Avatar
#2584
Auto-translated
AstralLein
I have a question: what is the correct command to change the type of a building that recruits creatures on the map (the ones that increase recruitment)? I need to change all 4 Dwarf buildings, including the outpost, to the corresponding Necropolis buildings.
ReplaceDwelling('name', TOWN_NECROMANCY)
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
#2586
Auto-translated
What is the entire script like?
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
#2587
Auto-translated
Just a moment...

Added 4 minutes later
Trigger(OBJECT_CAPTURE_TRIGGER, "PlayerTown", "CaptureStraker")

function CaptureStraker()
if ( GetObjectOwner ("PlayerTown") == PLAYER_4 ) then
Trigger(OBJECT_CAPTURE_TRIGGER, "PlayerTown", nil)
sleep(5)
TransformTown("PlayerTown", TOWN_NECROMANCY)
ChangeHeroStat("Straker", 7, -999999999999999)
sleep(5)
SetAIPlayerAttractor("PlayerTown", 4, 1)
ReplaceDwelling("Dwell1", TOWN_NECROMANCY)
SetObjectOwner("Dwell1", 4)
ReplaceDwelling("Dwell2", TOWN_NECROMANCY)
SetObjectOwner("Dwell2", 4)
ReplaceDwelling("Dwell3", TOWN_NECROMANCY)
SetObjectOwner("Dwell3", 4)
ReplaceDwelling("Dwell4", TOWN_NECROMANCY)
SetObjectOwner("Dwell4", 4)
end
end

Added 1 minute later
ChangeHeroStat("Straker", 7, -999999999999999) was intended to remove all movement points and prevent the hero from committing suicide during the castle transformation, but he still manages to enter it and die.
Карты для героев 5

"Плата за любовь"
"Путь некроманта"
"Темные грани"
"Рок Гримхейма"
User Avatar
#2588
Auto-translated
Place commands like print(1), print(2), ... between the key commands so you can see exactly what is not being executed.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
#2590
Auto-translated
That’s strange, I just checked it on the Blade Keep on the “School” map, and it worked.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

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