Skip to content

Posts from Scripts

4.8 (8 ratings)
User Avatar
Auto-translated
It didn't help, so I decided to give up. Now, it's not necessary to kill summoned creatures, only the main ones. A standard battle with a couple of tweaks. But still, thank you. Here's a question. When a script casts a spell, the computer also makes its regular move simultaneously, as you know. This works for me, but the elemental summoning spell gets stuck and doesn't play the animation. It looks a bit awkward. Is there a way to fix this?
Карты для героев 5

"Плата за любовь"
"Путь некроманта"
"Темные грани"
"Рок Гримхейма"
User Avatar
Auto-translated
You can play the animation on a unit using the `playAnimation` function; the parameters are the same as for `PlayObjectAnimation`.
If the double turn becomes undesirable, you can return 1 from the function that overrides the turn; in this case, the unit will defend instead of performing its usual action.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
In reply to RedHeavenHero
Auto-translated
Everyone is asking how to remove the circles that indicate resource points, but I need to remove the creature and leave the circle – how do I do that?
User Avatar
Auto-translated
How to remove a creature and leave only the circle?
Circles are available as hidden objects; you can place them from the editor (via shared) or create them dynamically using CreateStatic(). They are located in the /MapObjects/Effects/Selections/ folder.
In reply to AstralLein
User Avatar
Auto-translated
AstralLein
By the way, do combat scripts work the same way in cities?
Cities have their own city scripts, whose functionality is limited to two intercepting functions for hiring heroes and creatures, and most likely common ones like mod, print, consoleCmd. Since all this can be done through a strategic map script, there is not much point in the existence of city scripts.
Or was the question about sieges?

Added 7 minutes later
AstralLein
There's just a pause and a unit of elementals appears. Without animation, sometimes, very rarely, it does play.
Perhaps this is a feature of creating this spell through a script.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
In reply to AstralLein
User Avatar
Auto-translated
AstralLein
Yes. I'm curious, will Hagnar's script work similarly during a city siege?
Yes, but the script must be enabled for the attacking hero. If it's only enabled for the defending hero, the script won't run.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
In reply to AstralLein
Auto-translated
Is it just me, or does everyone else have this issue with the editor? I have 3 players: one is the player character for whom the scenario is intended, and I've set their control to "player," while the others are set to "computer control." However, I can play as the characters who are supposed to be controlled by the computer, but the third player can only be controlled by the computer. Does anyone know how to fix this? I've been struggling with it for two evenings now. :smile45:
User Avatar
Auto-translated
In single-player scenarios, you can only play as the first player. But you can change the flag color.
 

К А
Стикеры GBF в Telegram
In reply to Годрикова впадина
Auto-translated
I can't figure out how to set it up so that you can only play as the 3rd player, with a total of 4 players: 1, 2, and 3 against 5. Okay, I'll keep trying.
User Avatar
Auto-translated
That’s what I’m saying, it’s unlikely to be possible (unless it’s multiplayer).
 

К А
Стикеры GBF в Telegram

Statistics