Skip to content

Posts from Current questions and answers regarding the map editor. Auto-translated

5.0 (12 ratings)
User Avatar
#898
Auto-translated
Hello to all visitors!
I have the following question: is it possible to implement a feature where, after defeating an enemy army, my troops are replenished? For example, I start with 13 peasants, and after the victory, all my troops are restored, bringing the total back to 13!
And also, if I gain a new level, for example, level 3, could I receive, say, 16 Swordsmen?
If this is possible, how can I do it?
Thank you in advance for everything and for your attention!
----------------------------------------------
Я начинающий картостроитель.Скоро буду
выкладывать карты, когда научусь всё делать.:smile01: :smile01:
#899
Auto-translated
In the first case, I'm explaining that I understand. So, we write a script. function имя_функции() MakeHeroInteractWithObject('scripted_monster_name'). AddHeroCreatures(creature_name, number_of_creatures) Trigger(OBJECT_TOUCH_TRIGGER, 'scripted_monster_name', nil) end; Trigger(OBJECT_TOUCH_TRIGGER, 'scripted_monster_name', 'function_name') SetObjectEnabled('Scripted_Monster_Name', nil). Example: function peasantsF() MakeHeroInteractWithObject('peasants'). AddHeroCreatures(CREATURE_ARCHER, 35) Trigger(OBJECT_TOUCH_TRIGGER, 'peasants', nil) end; Trigger(OBJECT_TOUCH_TRIGGER, 'peasants', 'peasantsF') SetObjectEnabled('peasants', nil)

Added 30 minutes later
Regarding the second case, I'm not very familiar with threads, but here's what I came up with: function Thread() while 1 do if GetHeroLevel == 3 then AddHeroCreatures(CREATURE_SWORDSMAN, 16) else sleep(5) end; end; end; StartThread(Thread)
Мои карты:
SinglePlayer: Выбор Зехира
Падение Стедвика(pre-release)
Готовится: Зима Титанов, Столетняя война
In reply to djulian13
User Avatar
#900
Auto-translated
Could you, djulian13, create a script for me because I don't understand anything about scripts? I want the troops to be replenished after each battle. Specifically, I want 5 Imps and 22 Demons, and after winning a battle, they should be replenished. When I reach level 2, 8 more Demons should be added. When I reach level 3, 1 Imp should be removed, but 14 Hellhounds should be added. At level 4, there should be 5 Imps, 30 Demons, and 15 Hellhounds. At level 5, there should be 29 Devils, 7 Horned Beasts, 19 Hellhounds, and 8 Succubi. At level 6, there should be 29 Devils, 1 Demon, 20 Hellhounds, and 11 Succubi. At level 7, there should be 44 Devils, 30 Hellhounds, and 16 Succubi. At level 8, there should be 2 Devils, 79 Fire Demons, 26 Hellhounds, 8 Succubi, and 6 Hell Steeds. At level 9, there should be 53 Devils, 34 Cerberi, 14 Succubi, and 8 Hell Steeds. At level 10, there should be 14 Fire Demons, 36 Cerberi, 18 Succubi, and 10 Hell Steeds. At level 11, there should be 63 Devils, 35 Fire Demons, 42 Cerberi, 2 Succubi, 12 Hell Steeds, and 4 Cave Demons. At level 12, there should be 18 Devils, 51 Cerberi, 25 Demonesses, 14 Hell Steeds, and 4 Cave Lords. At level 13, there should be 72 Devils, 52 Cerberi, 18 Demonesses, 14 Hell Steeds, and 4 Cave Demons. I want the troops to be replenished after each battle. For example, if I win at level 3, the troops for level 3 should be replenished. If I win at level 5, the troops for level 5 should be replenished! If I advance to the next level, the troops from the previous levels should disappear, and the troops from the new levels should appear. Thank you in advance for the script! I eagerly await your response with the script. :smile31: :smile31: :smile31: :smile31:
----------------------------------------------
Я начинающий картостроитель.Скоро буду
выкладывать карты, когда научусь всё делать.:smile01: :smile01:
#901
Auto-translated
Regarding your specific goal, I recommend consulting with more experienced mapmakers; I'm not very good with scripts, but never mind, let's take a look.
Question: Do you play Heroes of Might and Magic? The army compositions and overall mechanics are very similar =).
The script for giving creatures based on level seems not too complicated. It's done with the following commands:
AddHeroCreatures('hero_name', CREATURE_creature_name, number_of_creatures)
RemoveHeroCreatures('hero_name', CREATURE_creature_name, number_of_creatures)
while 1 do
if/elseif
StartThread
Here's another problem – restoring creatures after a battle.
Comrade Duncan, I advise you not to rely on others to do it for you, but to try yourself – you have all the cards in your hands.
But for now, I'll try to do something myself.

So, here's the deal. Now I have the following questions:
1) Question: What is the animName for the animation of opening the castle gates? I've looked everywhere, but I can't find it.
2) In connection with the problem of restoring creatures, is it possible to make it so that after a battle, the creatures are replenished to a specific value, depending on the hero's level?
Sincerely.
Мои карты:
SinglePlayer: Выбор Зехира
Падение Стедвика(pre-release)
Готовится: Зима Титанов, Столетняя война
User Avatar
#902
Auto-translated
Guys, if you need it, I have a similar script in the "The Tale of Igor's Campaign" mission: after the battle with Sir Stern, the troops are replenished.
 

К А
Стикеры GBF в Telegram
In reply to djulian13
User Avatar
#906
Auto-translated
djulian13 you are right, I was very into the game, but it became uninteresting because of the noobs. I wanted to create a map with levels and characters, but I can't add troops until I reach the required level. I wanted to do this not only for demons but for all factions. Could you please help me and implement everything as I ask? I can provide more details if needed. I'm not very good with scripts!!!
Please help, I'm asking for your help!!!:smile45: :smile45: :smile45: :smile45: :smile45: :smile45:
----------------------------------------------
Я начинающий картостроитель.Скоро буду
выкладывать карты, когда научусь всё делать.:smile01: :smile01:
In reply to djulian13
User Avatar
#908
Auto-translated
djulian13 I'm working on the layout right now. I'll send screenshots in an hour. I can say right away that this game will include all the factions. P.S. Thanks again for your help!!! By the way, I need it so that when I reach level 5, I can use level 5 spells. But when I'm on level 4, the enemies also go to level 3. When I'm on level 5, they're also on level 5. I'm on level 6 - they're still on level 5. I'm on level 7 - they're on level 6. I'm on level 8 - they're on level 8. I'm on level 9 - they're on level 9. I'm on level 10 - they're on level 10. I'm on level 11 - they're on level 10. I'm on level 12 - they're on level 12, and after level 12, when I go to level 13, they also go to level 13, well, basically, so that after level 12, we are at the same level. Can it be done like this? Because I don't even know:smile32: :smile32: :smile32:
----------------------------------------------
Я начинающий картостроитель.Скоро буду
выкладывать карты, когда научусь всё делать.:smile01: :smile01:
In reply to Дункан
User Avatar
#909
Auto-translated
Here is an example of my map below. I want something similar to this. But I also need a script. So that you can play not only with Necropolis, but also move in turns and play against each enemy hero. If you lose, the hero shouldn't disappear but remain with the same troops. P.S. Open the map with the map editor. Thank you for your attention and help!!!
Attachments 1
1 file attached • Total size: 22.2 KB
----------------------------------------------
Я начинающий картостроитель.Скоро буду
выкладывать карты, когда научусь всё делать.:smile01: :smile01:
In reply to djulian13
User Avatar
#911
Auto-translated
Okay. I only need the scripts. But if you really want to, you can also create a map. Thanks again for your help!
----------------------------------------------
Я начинающий картостроитель.Скоро буду
выкладывать карты, когда научусь всё делать.:smile01: :smile01:
In reply to Дункан
User Avatar
#912
Auto-translated
Hello to all forum visitors!
How can I make a hero in the editor start at level 3 or 2 instead of level 1? Does this require a script?
Thank you in advance for your answers.
----------------------------------------------
Я начинающий картостроитель.Скоро буду
выкладывать карты, когда научусь всё делать.:smile01: :smile01: