Has anyone done a visual effect where an object might slowly have its transparency reduced to zero, then back up to 100%? If so, are there any nice effective ways of going about this? So far, the only thing I can think of is using a variable to determine when to raise or lower the transparency. If transparency = 100, set variable to 1. If variable = 1, reduce transparency every tick. If transparency = 0, set variable to 0. If variable = 0, increase transparency every tick.
Would something like that be my only method of executing an effect like this?