THOUSANDS OF FREE BLOGGER TEMPLATES »

Tuesday, November 17, 2009

Challenge 2.

okay, for the second challenge, i had to have 2 different sprites walking in random directions, and then when they touched each other they had to stop, or react in a different way.

so, for this, it took a while to figure out a code for making them stop when touching, but i got there.

the code all together looked like this :

im not sure that's the absolute right way to do it, but i don't think it matters cause it does the job.

instead of making the code twice, cause that's friggin' annoying, i just right clicked on the code and duplicated it, and dragged it over the picture of my second sprite like this
and just let go.
also, you can make your own variations where you deem necessary

0 comments: