Let's say I have an object that I want to be transparent, then gradually becomes opaque. Usually I create a variable within the object named "transparency", and
if "transparency" = 0
then every "tick" obj.transparency= obj.transparency + 5
and if "transparency" = 1, it does the opposite.
Is there any way of handling this better? I'm not that good with programming, and I feel this isn't the right way of doing it.. I also feel like it should go fast like that. I wanted it to go fast at the beggining, then when it gets close to being completely opaque, it slows down the speed it's doing it.. is there a formula for that?
Sorry, it's kinda hard to explain since english isn't my first language.