so i can script de-celeration, but what about acceleration?
how do you , onEnterFrame, make something accelerate without going past the target?
thank you
Printable View
so i can script de-celeration, but what about acceleration?
how do you , onEnterFrame, make something accelerate without going past the target?
thank you
Hello there i have a deal for you, if you can tell me how you do you decelleration how ill tell you how to accelerate
Please try this code:
Code:var ac=1.1;
var vx=5;
mc.onEnterFrame=function(){
mc._x+=vx;
vx=vx*ac; //acceleration.
if(vx>25)ac=0.9; //deceleration.
if(vx<0.5)vx=0;
}
dudes...i posted that 4 years ago
sorry i didnt come back and close the thread
but i got it worked out
thanks anyway
LOL.Quote:
Originally Posted by bbchamp88
How did bbchamp88 found your thread in the first place!!!
This is nostalgic!
Hey man lol i cant belive this has just happend. I havnt been doing actionscript for years right and i posted on this back in 2007.
I now am trying to rember how to do acceleration and deceleration haha.
i was just going through the forum and i found my old post by a fluke!
holly ****. sorry i didnt repsond i would have helped if i remebered lol but yeah i havnt been on here in like 2 years its ****in crazy.
msn me [email protected]
peace
cool. can't wait myself looking through forums how to multiply matrices or some stuff like that. btw... that just gave me an idea for new thread.