Friday, March 21, 2008

AccelerationnnnnnnnnnNNNNNN

Figured out some code for acceleration and applied it to my little car that I've been testing things on. Here's some code:

_x += speedh;
speedh += .1;
//happens if Key.isDown

Apparently the computer will determine my variable types for me. If I C&P that code right there into any if(Key.isDown(Key.KEY)){ thing it will work. I don't have to define what speedh is anywhere else. (speedh stands for horizontal speed)

I'm going to set up an FTP so that I can host files on my domain name. After I do that I'll be able to post links to .swf files to make reading this more fun =D

No comments: