I would use auxiliary values. For example, at the very beginning of the map, I would place:
a = 0;
In the second trigger, I would add a check:
if a == 1 then
Your function
Trigger reset
else
if a == 0 then
Text: You have not visited the first hut
end;
end;
And in the first hut, write your function, and at the end add:
a = 1;
If it's not clear, I can write a detailed template later.
Auto-translated