Skip to content

Current questions and answers regarding the map editor.

#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)
Готовится: Зима Титанов, Столетняя война