Skip to content

Current questions and answers regarding the map editor.

User Avatar
#2811
Auto-translated
Hello! I found a small bug on the map - only player 7 can attack creatures of the Dungeon faction (they must join him according to the conditions), and the other players cannot interact with the creatures of this faction. How can I fix this?

Added 44 minutes later
And how do I make it so that there is a Lich on the map, and with him there are skeletons and other nasty creatures?

Added 7 minutes later
The Dungeon creatures are controlled by a script.
function InitDungeonCreatures()
for i, mob in GetObjectNamesByType"CREATURE" do
local type = GetObjectArmySlotCreature(mob, 0)
if (type >= CREATURE_SCOUT and type <= CREATURE_BLACK_DRAGON) or (type >= CREATURE_STALKER and type <= CREATURE_RED_DRAGON) then
SetObjectEnabled(mob, nil)
Trigger(4, mob, "TouchDungeonCreature")
end
end
end

function TouchDundeonCreature(hero, monster)
if hero == "Dalom" then
SetMonsterCourageAndMood(monster, 1, 0, 0)
end
SetObjectEnabled(monster, 1)
Trigger(4, monster, nil)
sleep(1)
MakeHeroInteractWithObject(hero, monster)
end
If I didn't copy the whole thing, let me know, and I'll copy the rest...
Правило во взгляде...