Originally Posted by Nemnacill
I'm not sure about how it would work in lua, but any pulsating effect can be achieved with a simple sinus function.
pseudo code:
var sequence = 0;
sequence ++;
AlphaProperty = sin(sequence);
this would result in the AlphaProperty going from 0 to 1, then from 1 to 0 and so on. google 'math sin lua' for more info
Good luck
|
True, but that would require an onupdate function. And an onupdate function gets called at every frame. So if you run at 120 FPS your calling a sin function 120 times per second. Not that efficient as running my way(look above).