Posts from Scripts
Auto-translated
Copypasted from a fan manual.<col width="41" style="width: 31pt; mso-width-source: userset; mso-width-alt: 1450;"> <col width="249" style="width: 187pt; mso-width-source: userset; mso-width-alt: 8846;"> <col width="177" style="width: 133pt; mso-width-source: userset; mso-width-alt: 6286;"> <col width="518" style="width: 389pt; mso-width-source: userset; mso-width-alt: 18432;">
func TalkBoxForPlayers Opens a dialog with several response options (from 1 to 5) for selected players (playersFilter).
The function does not issue error messages because if parameters are incorrect, default values are usedplayersFilter PlayersFilteringConstantsID Identifier of selected players iconRef Reference to the icon texture iconTooltipRef Path to the icon tooltip text textRef Path to the dialog text addTextRef Path to the dialog text (additional) callback String with the name of a lua function, through whose first parameter the player's response is reported (number: 0 - cancel, -1 - closed by player, 1.. - number of the response selected by the player) mode Mode type: 0 - with OK button, 1 - OK/Close titleTextRef Path to the window title text selectTextRef Path to the header text before selection options defaultOption Number of the response highlighted by default (number: 0 - none, 1.. - response number) optionTextRef path to response text № 1 [ optionTextRef] Path to response text № ... … [Response number]
Added after 3 minutes
The player who answered the question and the response number (responses 1-5, non-natural values indicate that the window was closed) are passed to the function with the name provided as the callback parameter.
thx, but I don't quite understand all the components of the function. I need a clear example. I need to ask the player a question with 4 response options, and they must choose one of them
Пробуждение зла
Нашествие из Преисподней
Смена эпох
Скачать все кампании одним архивом: Яндекс.Диск Google.Диск
You can download the set of 3 Campaigns (English version) here
Одиночные сценарии Heroes V 3.1:
Незваные гости
Красный кристалл
Синий кристалл
Закат тьмы
Мультиплеерные карты для Heroes V 3.1:
Легендарная война
Сердце вулкана
Передел мира
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога
Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
Added 25 minutes later
The name should be in a string. However, I can also create a bunch of .txt files, of course.
Added after 17 minutes
CreaturesNames = {
'/Text/Game/Creatures/Haven/Peasant.txt',
'/Text/Game/Creatures/Haven/Militiaman.txt',
'/Text/Game/Creatures/Haven/Archer.txt',
'/Text/Game/Creatures/Haven/Marksman.txt',
'/Text/Game/Creatures/Haven/Footman.txt',
'/Text/Game/Creatures/Haven/Swordsman.txt',
'/Text/Game/Creatures/Haven/Griffin.txt',
'/Text/Game/Creatures/Haven/RoyalGriffin.txt',
'/Text/Game/Creatures/Haven/Priest.txt',
'/Text/Game/Creatures/Haven/Cleric.txt',
'/Text/Game/Creatures/Haven/Cavalier.txt',
'/Text/Game/Creatures/Haven/Paladin.txt',
'/Text/Game/Creatures/Haven/Angel.txt',
'/Text/Game/Creatures/Haven/Archangel.txt',
'/Text/Game/Creatures/Inferno/Familiar.txt',
'/Text/Game/Creatures/Inferno/Imp.txt',
'/Text/Game/Creatures/Inferno/Demon.txt',
'/Text/Game/Creatures/Inferno/HornedDemon.txt',
'/Text/Game/Creatures/Inferno/HellHound.txt',
'/Text/Game/Creatures/Inferno/Cerberi.txt',
'/Text/Game/Creatures/Inferno/Succubus.txt',
'/Text/Game/Creatures/Inferno/InfernalSuccubus.txt',
'/Text/Game/Creatures/Inferno/Nightmare.txt',
'/Text/Game/Creatures/Inferno/FrightfulNightmare.txt',
'/Text/Game/Creatures/Inferno/PitFiend.txt',
'/Text/Game/Creatures/Inferno/Balor.txt',
'/Text/Game/Creatures/Inferno/Devil.txt',
'/Text/Game/Creatures/Inferno/ArchDevil.txt',
'/Text/Game/Creatures/Necropolis/Skeleton.txt',
'/Text/Game/Creatures/Necropolis/Skeleton_Archer.txt',
'/Text/Game/Creatures/Necropolis/Walking_Dead.txt',
'/Text/Game/Creatures/Necropolis/Zombie.txt',
'/Text/Game/Creatures/Necropolis/Manes.txt',
'/Text/Game/Creatures/Necropolis/Ghosts.txt',
'/Text/Game/Creatures/Necropolis/Vampire.txt',
'/Text/Game/Creatures/Necropolis/Vampire_Lord.txt',
'/Text/Game/Creatures/Necropolis/Lich.txt',
'/Text/Game/Creatures/Necropolis/Demilich.txt',
'/Text/Game/Creatures/Necropolis/Wight.txt',
'/Text/Game/Creatures/Necropolis/Wraith.txt',
'/Text/Game/Creatures/Necropolis/Bone_Dragon.txt',
'/Text/Game/Creatures/Necropolis/Shadow_Dragon.txt',
'/Text/Game/Creatures/Preserve/Pixie.txt',
'/Text/Game/Creatures/Preserve/Sprite.txt',
'/Text/Game/Creatures/Preserve/Blade_Juggler.txt',
'/Text/Game/Creatures/Preserve/War_Dancer.txt',
'/Text/Game/Creatures/Preserve/Wood_Elf.txt',
'/Text/Game/Creatures/Preserve/Grand_Elf.txt',
'/Text/Game/Creatures/Preserve/Druid.txt',
'/Text/Game/Creatures/Preserve/Druid_Elder.txt',
'/Text/Game/Creatures/Preserve/Unicorn.txt',
'/Text/Game/Creatures/Preserve/War_Unicorn.txt',
'/Text/Game/Creatures/Preserve/Treant.txt',
'/Text/Game/Creatures/Preserve/Treant_Guardian.txt',
'/Text/Game/Creatures/Preserve/Green_Dragon.txt',
'/Text/Game/Creatures/Preserve/Gold_Dragon.txt',
'/Text/Game/Creatures/Academy/Gremlin.txt',
'/Text/Game/Creatures/Academy/Master_Gremlin.txt',
'/Text/Game/Creatures/Academy/Stone_Gargoyle.txt',
'/Text/Game/Creatures/Academy/Obsidian_Gargoyle.txt',
'/Text/Game/Creatures/Academy/Iron_Golem.txt',
'/Text/Game/Creatures/Academy/Steel_Golem.txt',
'/Text/Game/Creatures/Academy/Magi.txt',
'/Text/Game/Creatures/Academy/Arch_Magi.txt',
'/Text/Game/Creatures/Academy/Genie.txt',
'/Text/Game/Creatures/Academy/Master_Genie.txt',
'/Text/Game/Creatures/Academy/Rakshasa.txt',
'/Text/Game/Creatures/Academy/Rakshasa_Rukh.txt',
'/Text/Game/Creatures/Academy/Giant.txt',
'/Text/Game/Creatures/Academy/Titan.txt',
'/Text/Game/Creatures/Dungeon/Scout.txt',
'/Text/Game/Creatures/Dungeon/Assasin.txt',
'/Text/Game/Creatures/Dungeon/Witch.txt',
'/Text/Game/Creatures/Dungeon/Blood_Witch.txt',
'/Text/Game/Creatures/Dungeon/Minotaur.txt',
'/Text/Game/Creatures/Dungeon/Minotaur_King.txt',
'/Text/Game/Creatures/Dungeon/Rider.txt',
'/Text/Game/Creatures/Dungeon/Ravager.txt',
'/Text/Game/Creatures/Dungeon/Hydra.txt',
'/Text/Game/Creatures/Dungeon/Chaos_Hydra.txt',
'/Text/Game/Creatures/Dungeon/Matron.txt',
'/Text/Game/Creatures/Dungeon/Matriarch.txt',
'/Text/Game/Creatures/Dungeon/Deep_Dragon.txt',
'/Text/Game/Creatures/Dungeon/Black_Dragon.txt',
'/Text/Game/Creatures/Neutrals/Fire_Elemental.txt',
'/Text/Game/Creatures/Neutrals/Water_Elemental.txt',
'/Text/Game/Creatures/Neutrals/Earth_Elemental.txt',
'/Text/Game/Creatures/Neutrals/Air_Elemental.txt',
'/Text/Game/Creatures/Neutrals/Black_Knight.txt',
'/Text/Game/Creatures/Neutrals/Death_Knight.txt',
'/Text/Game/Creatures/Neutrals/Phoenix.txt',
'/Text/Game/Creatures/Dwarf/Defender.txt',
'/Text/Game/Creatures/Dwarf/Stout_Defender.txt',
'/Text/Game/Creatures/Dwarf/Axe_Fighter.txt',
'/Text/Game/Creatures/Dwarf/Axe_Thrower.txt',
'/Text/Game/Creatures/Dwarf/Bear_Raider.txt',
'/Text/Game/Creatures/Dwarf/Blackbear_Raider.txt',
'/Text/Game/Creatures/Dwarf/Brawler.txt',
'/Text/Game/Creatures/Dwarf/Berserker.txt',
'/Text/Game/Creatures/Dwarf/Rune_Mage.txt',
'/Text/Game/Creatures/Dwarf/Flame_Mage.txt',
'/Text/Game/Creatures/Dwarf/Thane.txt',
'/Text/Game/Creatures/Dwarf/Warlord.txt',
'/Text/Game/Creatures/Dwarf/Fire_Dragon.txt',
'/Text/Game/Creatures/Dwarf/Magma_Dragon.txt',
'/Text/Game/Creatures/Haven/Landlord.txt',
'/Text/Game/Creatures/Haven/Longbowman.txt',
'/Text/Game/Creatures/Haven/Vindicator.txt',
'/Text/Game/Creatures/Haven/BattleGriffin.txt',
'/Text/Game/Creatures/Haven/Zealot.txt',
'/Text/Game/Creatures/Haven/Champion.txt',
'/Text/Game/Creatures/Haven/Seraph.txt',
'/Text/Game/Creatures/Neutrals/Wolf/name.txt',
'/Text/Game/Creatures/Neutrals/SnowApe/name.txt',
'/Text/Game/Creatures/Neutrals/Manticore/name.txt',
'/Text/Game/Creatures/Neutrals/Mummy/name.txt',
'/Text/Game/Creatures/Orcs/Goblin1.txt',
'/Text/Game/Creatures/Orcs/Goblin2.txt',
'/Text/Game/Creatures/Orcs/Centaur1.txt',
'/Text/Game/Creatures/Orcs/Centaur2.txt',
'/Text/Game/Creatures/Orcs/Orc1.txt',
'/Text/Game/Creatures/Orcs/Orc2.txt',
'/Text/Game/Creatures/Orcs/Shaman1.txt',
'/Text/Game/Creatures/Orcs/Shaman2.txt',
'/Text/Game/Creatures/Orcs/OrcChief1.txt',
'/Text/Game/Creatures/Orcs/OrcChief2.txt',
'/Text/Game/Creatures/Orcs/Wyvern1.txt',
'/Text/Game/Creatures/Orcs/Wyvern2.txt',
'/Text/Game/Creatures/Orcs/Cyclop1.txt',
'/Text/Game/Creatures/Orcs/Cyclop2.txt',
'/Text/Game/Creatures/Inferno/3rd/Quasit_Name.txt',
'/Text/Game/Creatures/Inferno/3rd/HornedLeaper_Name.txt',
'/Text/Game/Creatures/Inferno/3rd/FirebreatherHound_Name.txt',
'/Text/Game/Creatures/Inferno/3rd/SuccubusSeducer_Name.txt',
'/Text/Game/Creatures/Inferno/3rd/Hellmare_Name.txt',
'/Text/Game/Creatures/Inferno/3rd/PitSpawn_Name.txt',
'/Text/Game/Creatures/Inferno/3rd/ArchDemon_Name.txt',
'/Text/Game/Creatures/Dungeon/3rd/Stalker_Name.txt',
'/Text/Game/Creatures/Dungeon/3rd/BloodWitch2_Name.txt',
'/Text/Game/Creatures/Dungeon/3rd/MinotaurCaptain_Name.txt',
'/Text/Game/Creatures/Dungeon/3rd/BlackRider_Name.txt',
'/Text/Game/Creatures/Dungeon/3rd/AcidicHydra_Name.txt',
'/Text/Game/Creatures/Dungeon/3rd/ShadowMistress_Name.txt',
'/Text/Game/Creatures/Dungeon/3rd/RedDragon_Name.txt',
'/Text/Game/Creatures/Preserve/3rd/Dryad_Name.txt',
'/Text/Game/Creatures/Preserve/3rd/BladeSinger_Name.txt',
'/Text/Game/Creatures/Preserve/3rd/SharpShooter_Name.txt',
'/Text/Game/Creatures/Preserve/3rd/HighDruid_Name.txt',
'/Text/Game/Creatures/Preserve/3rd/WhiteUnicorn_Name.txt',
'/Text/Game/Creatures/Preserve/3rd/AngerTreant_Name.txt',
'/Text/Game/Creatures/Preserve/3rd/RainbowDragon_Name.txt',
'/Text/Game/Creatures/Necropolis/3rd/SkeletonWarrior_Name.txt',
'/Text/Game/Creatures/Necropolis/3rd/DiseaseZombie_Name.txt',
'/Text/Game/Creatures/Necropolis/3rd/Poltergeist_Name.txt',
'/Text/Game/Creatures/Necropolis/3rd/Nosferatu_Name.txt',
'/Text/Game/Creatures/Necropolis/3rd/LichMaster_Name.txt',
'/Text/Game/Creatures/Necropolis/3rd/Banshee_Name.txt',
'/Text/Game/Creatures/Necropolis/3rd/HorrorDragon_Name.txt',
'/Text/Game/Creatures/Academy/3rd/GremlinSaboteur_Name.txt',
'/Text/Game/Creatures/Academy/3rd/MarbleGargoyle_Name.txt',
'/Text/Game/Creatures/Academy/3rd/ObsidianGolem_Name.txt',
'/Text/Game/Creatures/Academy/3rd/CombatMage_Name.txt',
'/Text/Game/Creatures/Academy/3rd/DjinnVizier_Name.txt',
'/Text/Game/Creatures/Academy/3rd/RakshasaKshatri_Name.txt',
'/Text/Game/Creatures/Academy/3rd/StormLord_Name.txt',
'/Text/Game/Creatures/Dwarf/3rd/StoneDefender_Name.txt',
'/Text/Game/Creatures/Dwarf/3rd/Harpooner_Name.txt',
'/Text/Game/Creatures/Dwarf/3rd/WhiteBearRider_Name.txt',
'/Text/Game/Creatures/Dwarf/3rd/BattleRager_Name.txt',
'/Text/Game/Creatures/Dwarf/3rd/FlameKeeper_Name.txt',
'/Text/Game/Creatures/Dwarf/3rd/ThunderThane_Name.txt',
'/Text/Game/Creatures/Dwarf/3rd/LavaDragon_Name.txt',
'/Text/Game/Creatures/Orcs/3rd/GoblinDefiler_Name.txt',
'/Text/Game/Creatures/Orcs/3rd/CentaurMaradeur_Name.txt',
'/Text/Game/Creatures/Orcs/3rd/OrcWarmonger_Name.txt',
'/Text/Game/Creatures/Orcs/3rd/ShamanHag_Name.txt',
'/Text/Game/Creatures/Orcs/3rd/OrcchiefChieftain_Name.txt',
'/Text/Game/Creatures/Orcs/3rd/WyvernPaokai_Name.txt',
'/Text/Game/Creatures/Orcs/3rd/CyclopBloodeyed_Name.txt',
}
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога
Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
Added 54 minutes later
Is a comma before the end of the loop mandatory?
Added 43 minutes later
And one more question:
I have an array, for example, a = {1, 2, 3} I have variables, for example, a1 = 0 and b1 = 0 But when I try to do this: b1 = a[a1], it doesn't work, even though the value should be a number. How can I do this?
a = {1,2,3}
a1 = 0
b1 = 0
b1 = a[a1] --error
Because there is no element with a zero index in this array, only 1, 2, 3, and they correspond to the elements 1, 2, 3.
Added 6 minutes later
By the way, it was also not necessary to equate b1 to zero.
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога
Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
table = {[0]=1; 5, 4, 3, 8}`
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога
Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
2) It will be 0, because it is the first.
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога
Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
Now, I have one last question, as I've already done everything else:
-Basically, I can display a message with the name of a .txt creature. But how can I convert this name into a regular variable? Is that even possible? So that I can display a message like: has been added, !
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога
Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
Added 1 minute ago
--ShowFlyingSign({GetMapDataPath().."test.txt"; trues=CreaturesNames[gg1], trues2=retro2, trues3=retro3}, "Nymus", -1, 7);