Page 1 of 1

Um... Nframes glitch?

PostPosted: Sat May 01, 2010 4:19 pm
by Hblade
FIXED:

A save and reload of the ged somehow fixed it :O


Alright so heres the thing, I'm using a scrip where if the tmp variable is equal to the nframes (number of frames in an animation), then animpos will be equal to 0 but for some reason it automatically makes it the last frame... wtf? My code:
Code: Select all
if (tmp == nframes)
{
    animpos = 0;
}
if (tmp == -1)
{
    animpos = nframes - 1;
}


EDIT: Somehow, the second "if" statement was causing the tmp variable to fly down wtf?

Re: Um... Nframes glitch?

PostPosted: Sat May 01, 2010 4:22 pm
by Thanx
first of all I'd recommend using else if, instead of another simple if statement, on the other hand idk, you should be making sure tmp is the value you expect it to be, and the other thing is to check whether there could be any other code causing the change to be overwritten. Hope that helps! :wink:

Re: Um... Nframes glitch?

PostPosted: Sat May 01, 2010 4:24 pm
by Hblade
I fixed it but thanks :D

it worked when I saved it and reloaded the ged for some reason