Skip to content

Posts from Scripts

4.8 (8 ratings)
User Avatar
8 years ago
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?
User Avatar
8 years ago
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.
User Avatar
8 years ago
Auto-translated
Animation of the spell)
In reply to RedHeavenHero
8 years ago
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
8 years ago
Auto-translated
There's just a pause, and then a group of elementals appears. Without any animation, although sometimes, very rarely, it does play.
User Avatar
8 years ago
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.
User Avatar
8 years ago
Auto-translated
By the way, do combat scripts work the same way in towns?
In reply to AstralLein
User Avatar
8 years ago
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.
User Avatar
8 years ago
Auto-translated
Yes. I'm curious, will Hagnar's script work similarly during a city siege?
In reply to AstralLein
User Avatar
8 years ago
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.
User Avatar
8 years ago
Auto-translated
Exactly. I checked. If the hero is defending, nothing works. In all other cases, everything is normal.
In reply to AstralLein
8 years ago
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
8 years ago
Auto-translated
In single-player scenarios, you can only play as the first player. But you can change the flag color.
In reply to Годрикова впадина
8 years ago
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
8 years ago
Auto-translated
That’s what I’m saying, it’s unlikely to be possible (unless it’s multiplayer).

Statistics

Welcome our newest member: recijeb