Skip to content

Current questions and answers regarding the map editor.

User Avatar
#3654
Auto-translated
RedHeavenHero
function defeatFenix(hero)
if GetObjectiveState('fenix') == OBJECTIVE_UNKNOWN then
SetObjectiveState('fenix', OBJECTIVE_ACTIVE)
startThread(checkFenix)
elseif GetObjectiveState('fenix') == OBJECTIVE_COMPLETED then
Trigger(4, 'seer', nil)
AddHeroCreatures(hero, CREATURE_ANGEL, 45)
end
end

function checkFenix()
while 1 do
if not IsObjectExists('Phoenix1') then
SetObjectiveState('fenix', OBJECTIVE_COMPLETED)
break
end
sleep(10)
end
end

SetObjectEnabled('seer', nil)
Trigger(4, 'seer', 'defeatFenix')
For this to work, move the quest to the main list, name it "fenix", and also set IsInitialyActive and IsInitialyVisible to false, Kind = MANUAL, and name the hut itself "seer".
Okay, thanks, I'll try it now.

Added 10 minutes later
RedHeavenHero
function defeatFenix(hero)
if GetObjectiveState('fenix') == OBJECTIVE_UNKNOWN then
SetObjectiveState('fenix', OBJECTIVE_ACTIVE)
startThread(checkFenix)
elseif GetObjectiveState('fenix') == OBJECTIVE_COMPLETED then
Trigger(4, 'seer', nil)
AddHeroCreatures(hero, CREATURE_ANGEL, 45)
end
end

function checkFenix()
while 1 do
if not IsObjectExists('Phoenix1') then
SetObjectiveState('fenix', OBJECTIVE_COMPLETED)
break
end
sleep(10)
end
end

SetObjectEnabled('seer', nil)
Trigger(4, 'seer', 'defeatFenix')
For this to work, move the quest to the main list, name it "fenix", and also set IsInitialyActive and IsInitialyVisible to false, Kind = MANUAL, and name the hut itself "seer".
Hold on, you're saying to move the quest to the main list, but where is that? What other main list? And how do I do that?

Прокрастинирую...
"...Завтра станет лучше
но солнце так и не взошло..."