Yes, you change the value of a variable in a specific place, and that's it. Two region triggers without stopping the hero, changing the value + launching a new thread.
If my line of thinking is correct, then:
h = 0
function RemoveCreaturesStart()
h = 1
startThread(RemoveCreatureProgress)
Trigger(REGION_ENTER_WITHOUT_STOP_TRIGGER,'RC1', nil)
end;
Trigger(REGION_ENTER_WITHOUT_STOP_TRIGGER,'RC1','RemoveCreaturesStart')
function RemoveCreatureProgress()
while 1 do
if h == 1 then
RemoveObjectCreatures('Oddrema', CREATURE_CERBERI,28)
end;
sleep(1)
end;
end;
function RemoveCreatureStop()
if h == 1 then
h=2
else
if (h == 2) or (h == 0) then
h = 1
end;
Trigger(REGION_ENTER_WITHOUT_STOP_TRIGGER,'RC2',nil)
end;
Trigger(REGION_ENTER_WITHOUT_STOP_TRIGGER,'RC2','RemoveCreatureStop')
Sincerely.
Auto-translated