By this time my class is starting to finish up with scratch. I've made a few new programs, all of which are not exceptional, but have increased my understanding of Scratch. While I've completed most of my assignments with Scratch, there remains one that I haven't quite grasped.
This assignment requires that I make the Scratch cat move around randomly within the confines a box with a width and height of 200 units each. For me, it was easy to make the cat move in a random manner, but I didn't have the right setup to limit the cat within the box. I used an if-else loop to command the cat based on its position in the screen, since any movement past the box should be prevented with the if statement.
My teacher told me that the cat should not move if the intended number of steps in a direction plus its coordinate position is greater than 100 or less than -100. This helped me out, but I'm still sure what I should do about direction. If I make the cat change directions randomly, then I can't simply use the aforementioned formula to limit the cat's movement.
I'm close to being done with this, and I should have it finished after next period. Anyways, it's been nice knowing you Scratch, but I'm afraid I'll have to move on at some point!
-zk : out
No comments:
Post a Comment