BLOGGER TEMPLATES - TWITTER BACKGROUNDS »

Tuesday, November 17, 2009

Chomp, Chomp

This tutorial was a bit difficult but I discovered that if you double click on the score on the stage you have 3 options for what it looks like. One is just a number by itself, another says score and the actual score next to it, and another is where you can set the score back to 0.

Firstly, I imported the shark and the small fish. I had to make a variable which I named score. I then just made it randomly run around every where but not to randomly so I changed the pick random from 30 to 20 degrees. So both the fish and shark wouldn't fly off the edge I put an if on edge bounce block in. I then made the score cange by 1, the small fish scream and the shark to wait and move back -100 steps to let the small fish get away again. This was all done when the shark or the small fish bumped into each other.

The script was different for the shark and the fish. The small fish was simpler and it differed from the shark as I had to make the shark slower than the fish so it had acjance to catch it but faster by moving it 8 steps compared to the fish who was 5. I also made the shark scream instead of the small fish but it still worked anyway. So they wouldn't swim into no man's land and off the underwater stage I made them bounce if they touch the edge. I know that fish can't swim upside down so I had to make sure the 'only face left or right button' was clicked above the scripts and not the 'can rotate' button.

0 comments: