Sat Apr 13, 2013 1:41 pmGot an idea. To sync our total time on-line in the forum and to check when the post is made, i will insert the GE forums, last visited time in the topic ^
PROGRESS:---------------------------------------------------------------------------------------------------------------------------------------------------------------------
Ok for first two lines, im making the variables that holding the animation frame with the left/right light movement
- Code: Select all
char R_light[8] = {0, 6, 5, 4, 3, 2, 1, 11};
char L_light[8] = {0, 11, 1, 2, 3, 4, 5, 6};
that is used exactly like Animations Sequences from GE (but in this case, i cant use GE sequence because the animation is not sprite x{
So here you are. R_light is a variable that holding all the animation frame for the ball light when the ball move from -xscreen to +xcreen
and so for L_light. Now i will make it. I will make: for ball's right xvelocity from the min point of the -xscreen to the end to change all the animation for R_light once. I think i have to calculate it but i am bad at match x.x
For the next two lines i will do that:
- Code: Select all
double xpos = ball.x; // get the ball' x position in xpos variable
animpos = (xpos/180)*nframes; //an animation frame will be equal to the ball's position / the degree of the lighting change effect
For now the ball changing the light, but like there is an dynamic light somewhere on the map
- DEMO.rar
- (60.07 KiB) Downloaded 244 times
now only need to declare animpos's frames depending from the direction if is +x or -x; to make it realistic like there is a static light, up center from the screen of the game.