first, here 'mod' means 'modulo operation' or 'remainder'.
so, if you say IFrame mod 4 < 2, it means
if you divide 4 into the value 'IFrame' and you get a remainder less than 2.
and since the IFrame is dropping every frame, the remainder of the calculation will also be changed.
as the IFrame goes down, the remainder(IFrame mod 4) will take a cycle of 3->2->1->0->3->2->1->0->3->.. and so on.
now, when remainder is 1 or 0, then the IFrame mod 4 < 2 will be
true, which means visible = 0 and boss will be invisible.
and when remainder is 2 or 3, then it will be
false, visible = 1 and boss will be visible.
same goes with mod (interval X2) <(interval).
As the IFrame drops, IFrame mod (interval X2), or remainder will take a cycle from interval X2-1 to zero, then back to interval X2-1.
and if the remainder is smaller than interval, then the code will be
true, and I believe you'll get the picture.
Of course, interval X2 means twice the interval. By setting it that way, half the remainder will be same or higher than the interval(which means
false), and the other half will be lower than that(
true), so that you can control the number of frames of invisibility toggle.
hope this is simple enough.. I'm not good at explaining things