ENTITY* toSetInvisibleEnt;
void blah()
{
ENTITY* currentInvisible;
while(1)
{
if(currentInvisible != toSetInvisibleEnt){
reset(currentInvisible,INVISIBLE);
currentInvisible = toSetInvisibleEnt;
set(currentInvisible,INVISIBLE);
}
wait(1);
}
}
function blahaaa()
{
while(my)
{
//do your stuff
if(something or other is true)
toSetInvisibleEnt = my;
wait(1);
}
}