Skip to content
#764
Auto-translated
Mostovik
Hello!
Could you please tell me if combat scripts work in Multiplayer? I've heard for a long time that they don't work, or they work, but not quite as they should. I've never written them, so I wanted to know if it's worth learning about them?!
Basically, I'm interested in two things. First, I want to create an artifact similar to the Amulet of Absorption, but instead of returning 50%, it would return 20%.
Second, I want to create an ability similar to Garuna's: for each enemy creature killed, the army's initiative increases by 1. Using GiveHeroBattleBonus, you can give a bonus that appears directly during the battle (for example, a minute after the start of the battle), but unfortunately, I haven't been able to track the death of a unit yet.

Hello!
They work in Multiplayer. But some functions are not available. You can track it using the tactical function: AttackerCreatureDeath or DefenderCreatureDeath; the name of the monster (not a global one) is passed as the first and only parameter, and it is set when the tactical map is loaded. To avoid complications, I used to assign each stack of creatures its own name at the beginning of the battle, and then call one or the other as needed.

Statistics

Welcome our newest member: Emil