View Single Post
  #3 (permalink)  
Old 02-28-2008, 07:16 AM
Michel Michel is offline
Senior Member
 
Join Date: Feb 2006
Posts: 513
Michel is on a distinguished road
Quote:
Originally Posted by fxbs View Post
again, thank you everybody who helped:

when setting time (moving an object) to the right, use this function

int customTime(int a)
{
if(a<0)
return(Time[0]+Period()*60*MathAbs(a));
else return(Time[a]);
}

if you call it with - argument (say customTime(-5)) you are going to get FUTURE time and your object is going to be shifted to the right
int customTime(int a)
{
if(a<0)
return(Time[0]-Period()*60*a);
else return(Time[a]);
}
Reply With Quote