• Making alpha go down after some time., exponentially.
    7 replies, posted
Right now I have the alpha going down smoothly over time, but it's linear. I want it to be exponential, so that it'll start out slow and speed up, then slow again, or something. [lua]alpha = math.Clamp(alpha-FrameTime()*175, 0, 255)[/lua] What would the equation be?
math.Approach is linear, it's basically what I have now.
How about this: [lua]alpha = alpha * 0.8 - FrameTime( ) * speed;[/lua]
Are you making fading text?
[QUOTE=iRzilla;22868564]speed = math.sin(CurTime()) Maybe?[/QUOTE] Exponential, as in, exponents. I looked up exponential decay, I think I have it. [lua]alpha = math.Clamp(alpha-alpha^(FrameTime()*10), 0, 255)[/lua] [editline]02:43AM[/editline] [QUOTE=SchumacherAlt;22868765]Are you making fading text?[/QUOTE] yeah, it's a new TargetID that fades out.
Ah, that's cool. Good luck, Post a video of it when you finish, =]
Sorry, you need to Log In to post a reply to this thread.