Skip to content

Current questions and answers regarding the map editor.

User Avatar
#4770
Auto-translated
Question about animations on the map.
Are you setting the animation type to IDLE? They are (probably) incorrectly defined for these creatures. I suggest creating the battle as a series of ONESHOT animations. It works perfectly, and you can also set a floating interval between attacks, which looks much more realistic. That's what I always did:
function BattleThread()
  while (true) do
    if (IsObjectExists(CREATURE 1)) then
      PlayObjectAnimation(CREATURE 1, 'attack00', ONESHOT);
    end
    sleep(random(10)+5);
    if (IsObjectExists(CREATURE 2)) then
      PlayObjectAnimation(CREATURE 2, 'attack00', ONESHOT);
    end
    sleep(random(10)+5);
  end
end

startThread(BattleThread);
You can experiment with the intervals, types of attacks, you can set that when one creature attacks, the other receives the hit, and a whole bunch of other things.
РПГ-сценарий для HoMM5: Путь героя
ЧаВо по созданию карт для HoMM5: ЧаВо