Skip to content
User Avatar
#3967
Auto-translated
Madara_X
Azgalor, thank you so much! You really helped me out! I wanted to ask about StartCombat() and SiegeTown(). Am I correct in understanding that I cannot pass additional parameters, such as the enemy hero and their army, to the SiegeTown() function? I'm thinking of implementing the battle using StartCombat() and specifying a siege arena. I just can't find the file. Is it possible to implement SiegeTown() with additional parameters?
You're welcome, I was glad to help. Regarding SiegeTown() - it only accepts 3 arguments, namely: heroName (the hero who will lay siege), townName (the town being besieged), arenaName (a custom arena for the siege. This argument can be left blank, in which case the siege will take place on the town's standard arena, i.e., grass for humans and elves, lava for demons, etc.). It is filled in like this: SiegeTown("Godric", "/Maps/Scenario/C6M5/Ur-Hekal.xdb#xpointer(/AdvMapTown)",
'/Scenes/CombatArenas/Boss_c6m5_Biara.xdb#xpointer(/AdventureFlybyScene)'). This is a snippet of code from the final mission of the original Zehir Campaign, where you need to defeat Biara and the Master. You can take a look at how it all works there; it contains scripts for the siege of the city (battles with Biara) and for battles on a custom arena (with a shield and catapult) with the Master.
Regarding using StartCombat as a siege - I looked through the files and understand that the siege through this function is only implemented for the battle with the Master, for which a special combat arena folder has been created. It is located at Arenas/CombatArena/FinalCombat. So, if you need to create a unique siege, you can see how it is implemented on that arena. However, just below, I will explain how to find links to siege maps, and you can try using them for StartCombat(), but if you just need a scripted siege, it is easier to use SiegeTown(). You can place the city itself (if it is not planned to be present with the desired opponent) somewhere outside the visible area, and during the battle, at the initial stage, simply spawn units for the opponent, or spawn them even before the battle.
Madara_X
I'm searching along the path /Arenas/CombatArena/Stronghold_arena, but I only see textures, materials, and objects of the arena. Hence the question: where should I look for the arena file (what should its extension be?)
Correct, those folders contain the arena models and their placement on it, i.e., towers, walls, and gates. In general, links to siege arenas are specified in the configuration files of the cities themselves. That is, you place (or open in the game resources and view the file directly there, but it is probably more convenient through Shared, because there is a direct path to the file) the city, go to its Shared, and you will see the Combat line, which contains a link to the city's combat arena. This link leads to a file that loads the arena map itself and the objects (towers, walls, and gates) onto it.

Всякое/карты:

Добавление недостающей музыки гномам

Statistics

Welcome our newest member: leyu