you could use:
NPC Code:
if (playerenters||timeout) {
hide;
sleep 2;
show;
timeout=2;
}
or, you could go for the less convenient option...
NPC Code:
if(strequals(#L,levelname)){
set onlevel;
}
while(onlevel){
hide;
sleep 2;
show;
sleep 2;
}
But the second is pointless. Use the first.