huge save var help. timer

Non-platform specific questions.

huge save var help. timer

Postby mrgame » Fri Mar 07, 2008 10:35 pm

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
mrgame
 
Posts: 118
Joined: Sun Oct 21, 2007 8:09 pm
Location: my computer
Score: 3 Give a positive score

Re: huge save var help. timer

Postby speckford123 » Fri Apr 04, 2008 6:58 pm

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
speckford123
 
Posts: 334
Joined: Fri May 05, 2006 6:33 pm
Score: 49 Give a positive score

Re: huge save var help. timer

Postby Game A Gogo » Sun Apr 06, 2008 5:01 am

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!
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron