Page 1 of 1

huge save var help. timer

PostPosted: Fri Mar 07, 2008 10:35 pm
by mrgame
ok i have an actor who is set for his text number to go up in draw actor by one.

i have anothr actor (ball) who is set with gravity and collision to a wall

i need for either the ball.x and ball.y to be saved or its yvelocity and xvelocity for each number

eg if the timer actors text number is 001 then it saves balls position or speed on 001 then it saves balls new positon on 002 and then new postion on 003

it can also save its velocity on 001 002 003 ect wt evers easyer. can anyone help

just incase ur wondering its gonna he time controll

Re: huge save var help. timer

PostPosted: Fri Apr 04, 2008 6:58 pm
by speckford123
looks like nobody posted here yet, so i will

have 2 variables like xvel2 and yvel2, and on the time stop try something like

xvel2=yvelocity;
yvel2=yvelocity;
xvelocity=0;
yvelocity=0;

this way when its over just reverse it

xvelocity=xvel2;
yvelocity=yvel2;

EDIT: after re-reading your post i think this isn't what you wanted, sorry if it didn't help

Re: huge save var help. timer

PostPosted: Sun Apr 06, 2008 5:01 am
by Game A Gogo
make a var in the global script
Code: Select all
int Location[2048][2];
unsigned short int FrameC;

then on draw actor of the actor you want to save the location from and script editor
Code: Select all
if(FrameC>=2048)FrameC;//This will prevent the reading beyond the allowed access space from Location, change this number if you are going to change the array size of Location
Location[FrameC][0]=x;
Location[FrameC][1]=y;
FrameC++;


I hope this helped!