Skip to content

Posts from Scripts

4.8 (8 ratings)
13 years ago
Auto-translated
It's exactly the same. Don't forget about the animation – you need to remove it, otherwise the game will crash.
And where is the caravan where I can change the model?
In reply to Polegche
13 years ago
Auto-translated
Polegche
Where can I find the caravan to change the model?
The question is not entirely clear, but I will try to answer...
You need to find the desired model through the property tree (MapPropertyTree), using the Shared tab.
User Avatar
13 years ago
Auto-translated
How can I make custom creature models for heroes, but ensure that this script only works on the map where I create it?
In reply to GodRick
User Avatar
13 years ago
Auto-translated
GodRick
How can I make creature models for heroes, but only so that this script works on the map where I create it?
This isn't a script. You need to select a hero, then go to the Shared tab on the left. There, you can choose a model.
User Avatar
13 years ago
Auto-translated
To prevent the mod from altering other maps, avoid modifying existing heroes and instead create new ones (as Dyrman did in NHF).
In reply to Ment
User Avatar
13 years ago
Auto-translated
I wish I knew how to create a separate one; I just started exploring and don't quite understand where to begin, and everything is in English.
In reply to GodRick
13 years ago
Auto-translated
Hello!
Could you please tell me if battle scripts work in multiplayer? I've heard that they don't work, or that they work, but not quite as intended. I've never written any, so I wanted to know if it's worth learning about them!
Specifically, 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 grant a bonus that appears during the battle (e.g., a minute after the start), but unfortunately, I haven't been able to track the death of a unit yet.
In reply to Mostovik
User Avatar
13 years ago
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.
13 years ago
Auto-translated
Thank you! If possible, could you provide a link to a map that features combat scripts, preferably one that supports multiplayer? I'd like to try and figure it out on my own first, so I don't ask any silly questions. Perhaps they are included in one of your maps listed in your signature?
In reply to Mostovik
User Avatar
13 years ago
Auto-translated
Mostovik
Good afternoon!
Please tell me, do battle scripts work in Multiplayer? I've heard for a long time that they don't work, or they work but not quite as needed. I haven't written any of them myself, so I wanted to know - is it worth learning about them?!
In my opinion, there’s no point in dealing with them for multiplayer right now.
1) Some scripts can be used in battles and in multiplayer, but it’s difficult to bind them to events on the arena in real time as you would like (either they don’t work, or they work poorly).
2) During online simultaneous play, the likelihood of desynchronization due to these scripts increases; save files may break, and the TalkBox function also breaks them. (They say this applies to regular network games too, but I don’t know for sure).
3) I conducted experiments to diversify the NHF mod. But I couldn’t achieve adequate control. So I abandoned this hopeless endeavor. If someone manages to achieve good control with a normal response time, that would be great.
4) It’s a pity that the hero’s army decreases at the end of the battle on the global map, rather than during the battle. You could increase something for the hero directly in the battle with a delay from the global map: for example, mana. But the delay gives different results on different computers :(
5) When trying to use battle scripts, the console complains about them, saying that they cannot be used. If there was a relative time delay for the game process itself, not the processor, maybe something would work.

P.S. A thousand devils! (this is the one-thousandth message on ХВ) :)
Mostovik
GiveHeroBattleBonus
This is a global function, not a combat one, although it does affect battles. It is similar to the bonus provided by structures such as a random Sanctuary, an orcish thingamajig that adds +10 to HP, a fountain, and an idol, etc.
13 years ago
Auto-translated
Thank you for saving me time – I won’t be studying combat scripts.
In reply to Mostovik
User Avatar
13 years ago
Auto-translated
Mostovik
Thank you for saving me time – I won’t be studying combat scripts.

If you’re interested, definitely take a look. You might be the one who solves some of the problems described above.
13 years ago
Auto-translated
Is it possible to display hero textures (faces) through messages, for example, using ShowFlyingSign or MessageBox?
In reply to Mostovik
13 years ago
Auto-translated
Mostovik
Is it possible to display hero textures (faces) through messages, for example, using ShowFlyingSign or MessageBox?
Only through TalkBox, but it's buggy in multiplayer.
13 years ago
Auto-translated
Good morning! Thank you for your answers. Here's another question: Does HERO_REMOVE_SKILL_TRIGGER pass the skill to be removed as a parameter? And if so, does it follow the hero? Unfortunately, I won't be able to check until late evening, as the game isn't installed, but I have time to write part of the code.

Statistics

Welcome our newest member: recijeb