I'm no maths wiz, but I found this way works:

It will run up and down between 0 and 100 at 'speed' speed.
Code:

int value = (int)(50 * abs(sinv(total_ticks * speed)));



EDIT: It's Lite-C BTW.

Last edited by sheefo; 04/28/07 15:54.